diff options
-rw-r--r-- | components/index.html | 2 | ||||
-rw-r--r-- | internal/handlers/main.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/components/index.html b/components/index.html index 76ba0a4..5af9278 100644 --- a/components/index.html +++ b/components/index.html @@ -17,7 +17,7 @@ {{range $index, $option := .Options}} <button hx-post="/answer" - hx-vals='{"selected": "{{$index}}", "question_id": "{{.ID}}"}' + hx-vals='{"selected": "{{$index}}", "question_id": "{{$.ID}}"}' hx-target="#ancestor" hx-swap="outerHTML" class="option-button" diff --git a/internal/handlers/main.go b/internal/handlers/main.go index 1f3f740..86d0915 100644 --- a/internal/handlers/main.go +++ b/internal/handlers/main.go @@ -61,6 +61,7 @@ func (h *Handlers) MainPage(w http.ResponseWriter, r *http.Request) { return } testQuestion := &models.Question{ + ID: 1, Text: "___ du keine Zweifel daran?", Options: []string{"Haben", "Hast", "Hat", "Habt"}, CorrectIndex: 1, |