expose sets list endpoint
This commit is contained in:
parent
61ab8c09dc
commit
3d96a8d316
3 changed files with 49 additions and 0 deletions
21
backend/app/Set/UseCases/ListSets/ListSets.php
Normal file
21
backend/app/Set/UseCases/ListSets/ListSets.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Set\UseCases\ListSets;
|
||||
|
||||
use App\Set\Set;
|
||||
use App\Set\SetRepository;
|
||||
|
||||
class ListSets
|
||||
{
|
||||
public function __construct(
|
||||
private SetRepository $setRepository,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @return list<Set>
|
||||
*/
|
||||
public function execute(): array
|
||||
{
|
||||
return $this->setRepository->all();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue