1 | <?php |
||
19 | class GenreController extends BaseController |
||
20 | { |
||
21 | /** |
||
22 | * Get all genres |
||
23 | * |
||
24 | * @Route("/api/genres", methods={"GET"}) |
||
25 | * |
||
26 | * @return JsonResponse |
||
27 | */ |
||
28 | 5 | public function getAll() |
|
35 | |||
36 | /** |
||
37 | * Create new genre |
||
38 | * |
||
39 | * @Route("/api/genres", methods={"POST"}) |
||
40 | * @param \App\Genres\Request\CreateGenreRequest $request |
||
41 | * @param \App\Genres\Service\GenreManageService $genreManageService |
||
42 | * @param ValidatorInterface $validator |
||
43 | * @return Genre|\Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\Response |
||
44 | */ |
||
45 | 2 | public function postGenres(CreateGenreRequest $request, GenreManageService $genreManageService, ValidatorInterface $validator) |
|
62 | |||
63 | /** |
||
64 | * Update genre |
||
65 | * |
||
66 | * @Route("/api/genres/{id}", methods={"POST"}) |
||
67 | * @param UpdateGenreRequest $request |
||
68 | * @param Genre $genre |
||
69 | * @param \App\Genres\Service\GenreManageService $genreManageService |
||
70 | * @param ValidatorInterface $validator |
||
71 | * @return Genre|\Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\Response |
||
72 | */ |
||
73 | 1 | public function putGenres(UpdateGenreRequest $request, Genre $genre, GenreManageService $genreManageService, ValidatorInterface $validator) |
|
90 | } |