fixes random person API call

This commit is contained in:
Irfan 2023-04-22 03:04:44 +05:00 committed by pushrbx
parent 9df3ae0d05
commit fe2b5869db

View File

@ -18,13 +18,6 @@ final class QueryRandomPersonHandler extends QueryRandomItemHandler
parent::__construct($repository);
}
protected function resource(Collection $results): JsonResource
{
return new PersonResource(
$results
);
}
/**
* @inheritDoc
*/
@ -32,4 +25,9 @@ final class QueryRandomPersonHandler extends QueryRandomItemHandler
{
return QueryRandomPersonCommand::class;
}
protected function resource(Collection $results): JsonResource
{
return new PersonResource($results->first());
}
}