From d28d2b6a44bea1f269feadc2b773253a95649f52 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 6 Dec 2016 01:55:24 -0800 Subject: adding test for sorting persisted in pagination --- system/admin/handlers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/admin') diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 6b5de26..247cca7 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -970,9 +970,9 @@ func postsHandler(res http.ResponseWriter, req *http.Request) { } // set up pagination values - urlFmt := req.URL.Path + "?count=%d&offset=%d&status=%s&type=%s" - prevURL := fmt.Sprintf(urlFmt, count, offset-1, status, t) - nextURL := fmt.Sprintf(urlFmt, count, offset+1, status, t) + urlFmt := req.URL.Path + "?count=%d&offset=%d&&order=%s&status=%s&type=%s" + prevURL := fmt.Sprintf(urlFmt, count, offset-1, order, status, t) + nextURL := fmt.Sprintf(urlFmt, count, offset+1, order, status, t) start := 1 + count*offset end := start + count - 1 -- cgit v1.2.3