Sort notes by title for list
This commit is contained in:
parent
8eaa0afda1
commit
38506f7e8b
2 changed files with 19 additions and 9 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue