diff options
author | Grail Finder <wohilas@gmail.com> | 2025-04-05 15:53:15 +0300 |
---|---|---|
committer | Grail Finder <wohilas@gmail.com> | 2025-04-05 15:53:15 +0300 |
commit | 5862de4e0cbe43ee273461043a230fa16ac049cc (patch) | |
tree | 8521454463bc05c0e35ccee535b598a4392aee1d /internal/handlers | |
parent | ac450f7a7d6bd45bf90cb48f1a7027e784029fa9 (diff) |
Enha: index adjust
Diffstat (limited to 'internal/handlers')
-rw-r--r-- | internal/handlers/main.go | 2 |
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>` |