mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 04:44:19 +01:00
Secure admin
This commit is contained in:
@@ -95,7 +95,7 @@ final class QuizController extends AbstractController
|
||||
$candidate = $candidateRepository->getCandidateByHash($season, $nameHash);
|
||||
|
||||
if (!$candidate instanceof Candidate) {
|
||||
$this->addFlash(FlashType::Danger, 'Candidate not found');
|
||||
$this->addFlash(FlashType::Danger, $this->translator->trans('Candidate not found'));
|
||||
|
||||
return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ final class QuizController extends AbstractController
|
||||
$question = $questionRepository->findNextQuestionForCandidate($candidate);
|
||||
|
||||
if (!$question instanceof Question) {
|
||||
$this->addFlash(FlashType::Success, 'Quiz completed');
|
||||
$this->addFlash(FlashType::Success, $this->translator->trans('Quiz completed'));
|
||||
|
||||
return $this->redirectToRoute('app_quiz_entername', ['seasonCode' => $season->getSeasonCode()]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user