summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/database/repos/main.go3
-rw-r--r--internal/handlers/main.go2
-rw-r--r--internal/models/models.go6
3 files changed, 8 insertions, 3 deletions
diff --git a/internal/database/repos/main.go b/internal/database/repos/main.go
index f6835c7..e49d303 100644
--- a/internal/database/repos/main.go
+++ b/internal/database/repos/main.go
@@ -2,12 +2,11 @@ package repos
import (
"github.com/jmoiron/sqlx"
- "demoon/internal/models"
)
type FullRepo interface {
DefaultsRepo
- DBGetQuestion(id string) (*models.Question, error)
+ QuestionsRepo
}
type Provider struct {
diff --git a/internal/handlers/main.go b/internal/handlers/main.go
index b6ce093..34f37d9 100644
--- a/internal/handlers/main.go
+++ b/internal/handlers/main.go
@@ -171,7 +171,7 @@ func (h *Handlers) renderQuestion(w http.ResponseWriter, question *models.Questi
*models.Question
}
- err = tmpl.ExecuteTemplate(w, "main", question)
+ err = tmpl.ExecuteTemplate(w, "question", question)
if err != nil {
h.log.Error("failed to render template", "error", err)
}
diff --git a/internal/models/models.go b/internal/models/models.go
index 8e30a6c..7cef85e 100644
--- a/internal/models/models.go
+++ b/internal/models/models.go
@@ -15,4 +15,10 @@ type (
ExamID uint32 `db:"exam_id"`
MixedID uint32 `db:"mixed_id"`
}
+ MixedUbung struct {
+ ID uint32 `db:"MixedID"`
+ Name string `db:"MixedName"`
+ Status int `db:"MixedStatus"`
+ LevelID uint32 `db:"LevelID"`
+ }
)