diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-07 16:11:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-07 16:11:08 +0900 |
| commit | b1f6ee58b3c8a61cd39431ef38dce20c68b68a40 (patch) | |
| tree | d5b4f8f968c0a1fc7f0d82907c004203133d6077 | |
| parent | 39736a81c4933f697d12fe4c993dc2ad3ae90f90 (diff) | |
| download | phperkaigi-2024-albatross-b1f6ee58b3c8a61cd39431ef38dce20c68b68a40.tar.gz phperkaigi-2024-albatross-b1f6ee58b3c8a61cd39431ef38dce20c68b68a40.tar.zst phperkaigi-2024-albatross-b1f6ee58b3c8a61cd39431ef38dce20c68b68a40.zip | |
fix an issue where answer link is not active in answer list page
| -rw-r--r-- | services/app/src/App.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/app/src/App.php b/services/app/src/App.php index 3eedfe7..2eb6797 100644 --- a/services/app/src/App.php +++ b/services/app/src/App.php @@ -282,8 +282,8 @@ final class App if ($quiz === null) { throw new HttpNotFoundException($request); } + $currentUser = $this->getCurrentUser($request); if ($quiz->isRankingHidden()) { - $currentUser = $this->getCurrentUser($request); if ($currentUser === null) { $answers = []; } else { @@ -299,7 +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, + 'current_user_id' => $currentUser?->user_id, ]); } |
