diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-19 23:03:58 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-19 23:03:58 -0800 |
commit | 0ec56f3c9ac85b97e4785c83cc1bb9412900faba (patch) | |
tree | 36fe9ad9c47d7fd9ef5b470ddb1197414626e81d | |
parent | 68c183ed75352a78434aeeee8e4d5bfd75db8dd7 (diff) |
update order of params to Query endpoint formatter
-rw-r--r-- | system/addon/api.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/addon/api.go b/system/addon/api.go index b75c09c..39f1b4d 100644 --- a/system/addon/api.go +++ b/system/addon/api.go @@ -37,8 +37,8 @@ func ContentAll(namespace string) []byte { func Query(namespace string, opts QueryOptions) []byte { host := db.ConfigCache("domain") port := db.ConfigCache("http_port") - endpoint := "http://%s:%s/api/contents?type=%s&count=%d&order=%s&offset=%d" - URL := fmt.Sprintf(endpoint, host, port, namespace, opts.Count, opts.Order, opts.Offset) + endpoint := "http://%s:%s/api/contents?type=%s&count=%d&offset=%d&order=%s" + URL := fmt.Sprintf(endpoint, host, port, namespace, opts.Count, opts.Offset, opts.Order) j, err := Get(URL) if err != nil { |