aboutsummaryrefslogtreecommitdiffhomepage
path: root/services/app/src/App.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-06 21:30:00 +0900
committernsfisis <nsfisis@gmail.com>2024-03-06 21:30:00 +0900
commit050b65de6ba50784c32ecf0432ddfd6a80b17311 (patch)
treedebf12eac5a2e443d9d8cce0ea0f9b72d53c0ff9 /services/app/src/App.php
parent3100340e7e59e3b0f61667dff35c0a56b67f83da (diff)
downloadphperkaigi-2024-albatross-050b65de6ba50784c32ecf0432ddfd6a80b17311.tar.gz
phperkaigi-2024-albatross-050b65de6ba50784c32ecf0432ddfd6a80b17311.tar.zst
phperkaigi-2024-albatross-050b65de6ba50784c32ecf0432ddfd6a80b17311.zip
show quizzes even if they are not started
Diffstat (limited to 'services/app/src/App.php')
-rw-r--r--services/app/src/App.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/app/src/App.php b/services/app/src/App.php
index ac8ca14..55f6ae3 100644
--- a/services/app/src/App.php
+++ b/services/app/src/App.php
@@ -227,7 +227,7 @@ final class App
ResponseInterface $response,
QuizRepository $quizRepo,
): ResponseInterface {
- $quizzes = $quizRepo->listStarted();
+ $quizzes = $quizRepo->listAll();
return $this->render($request, $response, 'quiz_list.html.twig', [
'page_title' => '問題一覧',
@@ -251,7 +251,7 @@ final class App
AnswerRepository $answerRepo,
): ResponseInterface {
$quiz = $quizRepo->findBySlug($qslug);
- if ($quiz === null || !$quiz->isStarted()) {
+ if ($quiz === null) {
throw new HttpNotFoundException($request);
}
if ($quiz->isRankingHidden()) {
@@ -277,7 +277,7 @@ final class App
AnswerRepository $answerRepo,
): ResponseInterface {
$quiz = $quizRepo->findBySlug($qslug);
- if ($quiz === null || !$quiz->isStarted()) {
+ if ($quiz === null) {
throw new HttpNotFoundException($request);
}
if ($quiz->isRankingHidden()) {
@@ -377,7 +377,7 @@ final class App
): ResponseInterface {
$anum = (int)$anum;
$quiz = $quizRepo->findBySlug($qslug);
- if ($quiz === null || !$quiz->isStarted()) {
+ if ($quiz === null) {
throw new HttpNotFoundException($request);
}
$answer = $answerRepo->findByQuizIdAndAnswerNumber($quiz->quiz_id, answer_number: $anum);
@@ -917,7 +917,7 @@ final class App
): ResponseInterface {
$qid = (int)$qid;
$quiz = $quizRepo->findById($qid);
- if ($quiz === null || !$quiz->isStarted()) {
+ if ($quiz === null) {
return $this->makeJsonResponse($response, [
'error' => 'not_found',
])->withStatus(404);