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:
parent
453ff64f29
commit
2f1367a8d4
28 changed files with 253 additions and 193 deletions
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue