diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/handlers/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/handlers/main.go b/internal/handlers/main.go index b485864..af8dbc7 100644 --- a/internal/handlers/main.go +++ b/internal/handlers/main.go @@ -85,6 +85,10 @@ func (h *Handlers) HandleAnswer(w http.ResponseWriter, r *http.Request) { abortWithError(w, err.Error()) return } + question.Status = 2 + if selectedIndex == question.CorrectIndex { + question.Status = 1 + } // Execute template with question data including status w.Header().Set("Content-Type", "text/html") |