summaryrefslogtreecommitdiff
path: root/internal/handlers/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/main.go')
-rw-r--r--internal/handlers/main.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/internal/handlers/main.go b/internal/handlers/main.go
index 86f5b09..4945db8 100644
--- a/internal/handlers/main.go
+++ b/internal/handlers/main.go
@@ -3,15 +3,12 @@ package handlers
import (
"demoon/config"
"demoon/internal/database/repos"
- "demoon/internal/models"
"html/template"
"log/slog"
"net/http"
"os"
)
-var defUS = models.UserScore{}
-
// Handlers structure
type Handlers struct {
cfg config.Config
@@ -45,17 +42,5 @@ func (h *Handlers) MainPage(w http.ResponseWriter, r *http.Request) {
abortWithError(w, err.Error())
return
}
- // get recommendations
- usernameRaw := r.Context().Value("username")
- h.log.Info("got mainpage request", "username", usernameRaw)
- if usernameRaw == nil {
- tmpl.ExecuteTemplate(w, "main", defUS)
- return
- }
- username := usernameRaw.(string)
- if username == "" {
- tmpl.ExecuteTemplate(w, "main", defUS)
- return
- }
tmpl.ExecuteTemplate(w, "main", nil)
}