From d7cf7820191806abf07638644826154e53db3abc Mon Sep 17 00:00:00 2001 From: privatmamtora Date: Mon, 18 Jul 2022 19:16:36 -0400 Subject: [PATCH] Allow option to order by title & author --- validator/entry.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validator/entry.go b/validator/entry.go index 4a5313f3..c7a96acb 100644 --- a/validator/entry.go +++ b/validator/entry.go @@ -32,9 +32,9 @@ func ValidateEntryStatus(status string) error { // ValidateEntryOrder makes sure the sorting order is valid. func ValidateEntryOrder(order string) error { switch order { - case "id", "status", "changed_at", "published_at", "created_at", "category_title", "category_id": + case "id", "status", "changed_at", "published_at", "created_at", "category_title", "category_id", "title", "author": return nil } - return fmt.Errorf(`Invalid entry order, valid order values are: "id", "status", "changed_at", "published_at", "created_at", "category_title", "category_id"`) + return fmt.Errorf(`Invalid entry order, valid order values are: "id", "status", "changed_at", "published_at", "created_at", "category_title", "category_id", "title", "author"`) }