summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrail Finder (aider) <wohilas@gmail.com>2025-04-05 18:12:46 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-04-05 18:12:46 +0300
commitb8616490acd715433458da8641f9f4a70cb1c1c0 (patch)
tree8ba6d032fdfd8e4dace4203d906c11d0bc6bae88
parentd14f8a2056a869710d0dcdd0cc5fc8923a404ec6 (diff)
fix: correct type mismatch in answer comparison
-rw-r--r--internal/handlers/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/handlers/main.go b/internal/handlers/main.go
index af8dbc7..3524241 100644
--- a/internal/handlers/main.go
+++ b/internal/handlers/main.go
@@ -86,7 +86,7 @@ func (h *Handlers) HandleAnswer(w http.ResponseWriter, r *http.Request) {
return
}
question.Status = 2
- if selectedIndex == question.CorrectIndex {
+ if selectedIdx == int(question.CorrectIndex) {
question.Status = 1
}