aboutsummaryrefslogtreecommitdiffhomepage
path: root/model/entry.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2017-12-02 17:04:01 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2017-12-02 17:04:01 -0800
commit2f1367a8d4c33e7c6ba459cfc6756e079c7a1af4 (patch)
tree04a2c15d41f79c05b74b67c9bbab4bfb483be6e1 /model/entry.go
parent453ff64f29c5ca330b20fb9c3dd41bbf7e7b7396 (diff)
Make entries sorting configurable
Diffstat (limited to 'model/entry.go')
-rw-r--r--model/entry.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/model/entry.go b/model/entry.go
index 79a3bcb..f9a9638 100644
--- a/model/entry.go
+++ b/model/entry.go
@@ -15,7 +15,7 @@ const (
EntryStatusRead = "read"
EntryStatusRemoved = "removed"
DefaultSortingOrder = "published_at"
- DefaultSortingDirection = "desc"
+ DefaultSortingDirection = "asc"
)
// Entry represents a feed item in the system.
@@ -81,8 +81,8 @@ func ValidateRange(offset, limit int) error {
return nil
}
-// GetOppositeDirection returns the opposite sorting direction.
-func GetOppositeDirection(direction string) string {
+// OppositeDirection returns the opposite sorting direction.
+func OppositeDirection(direction string) string {
if direction == "asc" {
return "desc"
}