diff options
Diffstat (limited to 'services/app/src/App.php')
| -rw-r--r-- | services/app/src/App.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/app/src/App.php b/services/app/src/App.php index 55f6ae3..e7d2816 100644 --- a/services/app/src/App.php +++ b/services/app/src/App.php @@ -260,12 +260,14 @@ final class App $ranking = $answerRepo->getRanking($quiz->quiz_id, upto: 20); } + $currentUser = $this->getCurrentUser($request); return $this->render($request, $response, 'quiz_view.html.twig', [ 'page_title' => "問題 #{$quiz->quiz_id}", 'quiz' => $quiz, 'ranking' => $ranking, 'is_ranking_hidden' => $quiz->isRankingHidden(), 'is_open' => $quiz->isOpenToAnswer(), + 'current_user_id' => $currentUser?->user_id, ]); } @@ -297,6 +299,7 @@ final class App 'answers' => $answers, 'is_ranking_hidden' => $quiz->isRankingHidden(), 'is_open' => $quiz->isOpenToAnswer(), + 'current_user_id' => isset($currentUser) ? $currentUser->user_id : null, ]); } |
