diff options
| author | Steve Manuel <nilslice@gmail.com> | 2016-12-06 01:55:24 -0800 |
|---|---|---|
| committer | Steve Manuel <nilslice@gmail.com> | 2016-12-06 01:55:24 -0800 |
| commit | d28d2b6a44bea1f269feadc2b773253a95649f52 (patch) | |
| tree | 3ec5e409d4bde31404653e85f655bc01213d5adf /system/admin | |
| parent | a53aec78899dad3d9ccdac86677d0b3918a4c876 (diff) | |
adding test for sorting persisted in pagination
Diffstat (limited to 'system/admin')
| -rw-r--r-- | system/admin/handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 |
