diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-08-15 13:39:00 -0600 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-08-15 15:14:52 -0600 |
commit | 075aba63ff98f6f16383f27895856da1569761c4 (patch) | |
tree | db6ae78b4770ae728d7c5623cb1214d4ef006910 /system/api/search.go | |
parent | 4818fd1fd68f6c8f1afe0c730cf4bca1861e6589 (diff) |
update Omittable, Pushable, interface to take res, req pair like Hooks, update implementations & hydrate items
Diffstat (limited to 'system/api/search.go')
-rw-r--r-- | system/api/search.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/api/search.go b/system/api/search.go index 9c7f0ae..b77de68 100644 --- a/system/api/search.go +++ b/system/api/search.go @@ -26,7 +26,7 @@ func searchContentHandler(res http.ResponseWriter, req *http.Request) { return } - if hide(it(), res, req) { + if hide(res, req, it()) { return } @@ -64,7 +64,7 @@ func searchContentHandler(res http.ResponseWriter, req *http.Request) { // if we have matches, push the first as its matched by relevance if len(bb) > 0 { - push(res, req, it, bb[0]) + push(res, req, it(), bb[0]) } var result = []json.RawMessage{} @@ -78,7 +78,7 @@ func searchContentHandler(res http.ResponseWriter, req *http.Request) { return } - j, err = omit(it(), j) + j, err = omit(res, req, it(), j) if err != nil { res.WriteHeader(http.StatusInternalServerError) return |