19 lines
431 B
PHP
19 lines
431 B
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
|
|
class SecurityController extends AbstractController
|
|
{
|
|
#[Route('/login', name: 'app_login')]
|
|
public function index(): Response
|
|
{
|
|
return $this->json([
|
|
$this->getUser()?->getId() ?? null
|
|
]);
|
|
}
|
|
}
|