Sorted ListEntries

This commit is contained in:
マリウス 2020-10-15 22:44:55 +01:00
parent f2b3fd06a8
commit b5c4204c38
No known key found for this signature in database
GPG key ID: C228EF0A530AF06F

View file

@ -2,6 +2,7 @@ package z
import (
"os"
"sort"
"log"
"errors"
"encoding/json"
@ -147,5 +148,6 @@ func (database *Database) ListEntries(user string) ([]Entry, error) {
return nil
})
sort.Slice(entries, func(i, j int) bool { return entries[i].Begin.Before(entries[j].Begin) })
return entries, dberr
}