Implement beginnings of tagging
This commit is contained in:
parent
4fb4bec5a8
commit
105275f3e0
5 changed files with 142 additions and 40 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"forgejo.gwairfelin.com/max/gonotes/internal/conf"
|
||||
"forgejo.gwairfelin.com/max/gonotes/internal/middleware"
|
||||
"forgejo.gwairfelin.com/max/gonotes/internal/notes"
|
||||
)
|
||||
|
||||
type Ctx map[string]any
|
||||
|
|
@ -31,7 +32,9 @@ func RenderTemplate(w http.ResponseWriter, r *http.Request, tmpl string, context
|
|||
return err
|
||||
}
|
||||
|
||||
context["user"] = r.Context().Value(middleware.ContextKey("user")).(string)
|
||||
user := r.Context().Value(middleware.ContextKey("user")).(string)
|
||||
context["user"] = user
|
||||
context["userTags"] = notes.Notes.UserTags(user)
|
||||
|
||||
err = t.ExecuteTemplate(w, "base", context)
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue