Merge branch 'Johan'

This commit is contained in:
jleroy2023
2024-11-25 16:28:18 +01:00
5 changed files with 59 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Controller;
use App\Repository\ParticipantRepository;
use App\Repository\SiteRepository;
use App\Repository\SortieRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -40,11 +41,20 @@ class MainController extends AbstractController
]);
}
#[Route('/inscription', name: 'inscription')]
public function inscription(TokenStorageInterface $tokenStorage): Response
{
return $this->render('main/inscription.html.twig');
}
#[Route('/participants', name: 'participants')]
public function participants(TokenStorageInterface $tokenStorage, ParticipantRepository $participantRepository): Response
{
$token = $tokenStorage->getToken();
$userConnect = $token?->getUser();
return $this->render('main/participants.html.twig', [
'profile' => $userConnect,
'participants' => $participantRepository->findAll(),
]);
}
}