chore: #123 unify metrics, logs, variable names and structure
This commit was merged in pull request #131.
This commit is contained in:
@@ -11,13 +11,13 @@ import (
|
||||
func HandleIndexAnd404(db *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var comp templ.Component = nil
|
||||
user_comp := UserInfoComp(verifySessionAndReturnUser(db, r))
|
||||
userComp := UserInfoComp(verifySessionAndReturnUser(db, r))
|
||||
|
||||
if r.URL.Path != "/" {
|
||||
comp = template.Layout(template.NotFound(), user_comp)
|
||||
comp = template.Layout(template.NotFound(), userComp)
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
} else {
|
||||
comp = template.Layout(template.Index(), user_comp)
|
||||
comp = template.Layout(template.Index(), userComp)
|
||||
}
|
||||
|
||||
comp.Render(r.Context(), w)
|
||||
|
||||
Reference in New Issue
Block a user