src/Controller/DefaultController.php line 34

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Doctrine\ORM\EntityManagerInterface;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\JsonResponse;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. use DateTime;
  10. use Firebase\JWT\JWT;
  11. use Symfony\Component\EventDispatcher\EventDispatcherInterface;
  12. use Symfony\Component\HttpFoundation\RequestStack;
  13. use Nelmio\ApiDocBundle\Annotation\Model;
  14. use OpenApi\Annotations as SWG;
  15. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  16. use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
  17. use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
  18. use Symfony\Component\Security\Core\Security;
  19. use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
  20. /**
  21.  * @Route("/", name="default", methods={"GET"})
  22.  * @param Request $request
  23.  *
  24.  * @return JsonResponse
  25.  * @SWG\Tag(name="Security")
  26.  * @SWG\Response(
  27.  *     response=200,
  28.  *     description="default"
  29.  * )
  30.  */
  31. class DefaultController extends AbstractController
  32. {
  33.     public function __invoke(Request $request): JsonResponse
  34.     {
  35.         return new JsonResponse([
  36.             'status' => 'success'
  37.         ], Response::HTTP_OK);
  38.     }
  39. }