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