mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
fixes random person API call
This commit is contained in:
parent
9df3ae0d05
commit
fe2b5869db
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user