Sorted ListEntries
This commit is contained in:
parent
f2b3fd06a8
commit
b5c4204c38
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ package z
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"log"
|
"log"
|
||||||
"errors"
|
"errors"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -147,5 +148,6 @@ func (database *Database) ListEntries(user string) ([]Entry, error) {
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
sort.Slice(entries, func(i, j int) bool { return entries[i].Begin.Before(entries[j].Begin) })
|
||||||
return entries, dberr
|
return entries, dberr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue