Sort notes by title for list

This commit is contained in:
Maximilian Friedersdorff 2026-01-05 20:46:32 +00:00
parent 8eaa0afda1
commit 38506f7e8b
2 changed files with 19 additions and 9 deletions

View file

@ -215,11 +215,11 @@ func list(w http.ResponseWriter, r *http.Request) {
titlesAndUrls := make([]titleAndURL, 0)
ns := notes.Notes.Get(user)
ns := notes.Notes.GetOrdered(user)
log.Printf("Notes: %+v", notes.Notes)
log.Printf("Notes for %s: %+v", user, ns)
for note := range ns {
for _, note := range ns {
if tag == "" || note.HasTag(tag) {
titlesAndUrls = append(
titlesAndUrls,