summaryrefslogtreecommitdiff
path: root/internal/handlers
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-04-05 15:53:15 +0300
committerGrail Finder <wohilas@gmail.com>2025-04-05 15:53:15 +0300
commit5862de4e0cbe43ee273461043a230fa16ac049cc (patch)
tree8521454463bc05c0e35ccee535b598a4392aee1d /internal/handlers
parentac450f7a7d6bd45bf90cb48f1a7027e784029fa9 (diff)
Enha: index adjust
Diffstat (limited to 'internal/handlers')
-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 5e1b8ae..b907a34 100644
--- a/internal/handlers/main.go
+++ b/internal/handlers/main.go
@@ -78,7 +78,7 @@ func (h *Handlers) HandleAnswer(w http.ResponseWriter, r *http.Request) {
abortWithError(w, "Invalid answer selection")
return
}
-
+ selectedIdx++ // in db index starts from 1
feedback := ""
if selectedIdx == int(question.CorrectIndex) {
feedback = `<div data-testid="feedback" class="feedback">Correct! 🎉</div>`