src/Controller/AppClient/Vacation/GetVacationController.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Controller\AppClient\Vacation;
  3. use App\Services\Vacation\VacationService;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\JsonResponse;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. use OpenApi\Annotations as OA;
  9. /**
  10.  * @Route("/api/appClient/v1/lk/vacations/all", name="app.client.vacations.get", methods={"GET"})
  11.  * @OA\Response(
  12.  *     response=200,
  13.  *     description="Информация о пользователе"
  14.  * )
  15.  * @OA\Parameter(
  16.  *     name="department",
  17.  *     in="query",
  18.  *     description="Должность"
  19.  * )
  20.  * @OA\Tag(name="App client")
  21.  */
  22. class GetVacationController extends AbstractController
  23. {
  24.     public function __invoke(VacationService $vacationServiceRequest $request): JsonResponse
  25.     {
  26.         return $this->json($vacationService->getVacations($request));
  27.     }
  28. }