summaryrefslogtreecommitdiff
path: root/internal/handlers
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-03-29 14:44:03 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-03-29 14:44:03 +0300
commit01a128d9f93960599c0f20beb640b5b035015893 (patch)
tree3496f68f8033dc931cce523c76e288709a68709b /internal/handlers
parent8e9c2e827da72980f9efb3bb6859a289f930119a (diff)
feat: Add test question to main page template
Diffstat (limited to 'internal/handlers')
-rw-r--r--internal/handlers/main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/handlers/main.go b/internal/handlers/main.go
index 4945db8..3f2e1b2 100644
--- a/internal/handlers/main.go
+++ b/internal/handlers/main.go
@@ -3,6 +3,7 @@ package handlers
import (
"demoon/config"
"demoon/internal/database/repos"
+ "demoon/internal/models"
"html/template"
"log/slog"
"net/http"
@@ -42,5 +43,10 @@ func (h *Handlers) MainPage(w http.ResponseWriter, r *http.Request) {
abortWithError(w, err.Error())
return
}
- tmpl.ExecuteTemplate(w, "main", nil)
+ testQuestion := &models.Question{
+ Text: "___ du keine Zweifel daran?",
+ Options: []string{"Haben", "Hast", "Hat", "Habt"},
+ CorrectIndex: 1,
+ }
+ tmpl.ExecuteTemplate(w, "main", testQuestion)
}