1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

Make entries sorting configurable

This commit is contained in:
Frédéric Guillot 2017-12-02 17:04:01 -08:00
parent 453ff64f29
commit 2f1367a8d4
28 changed files with 253 additions and 193 deletions

View file

@ -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"
}