mirror of
https://github.com/Threnklyn/zeit.git
synced 2026-05-19 05:13:31 +02:00
Sorted ListEntries
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user