summaryrefslogtreecommitdiff
path: root/system/api/handlers.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2017-01-26 10:48:40 -0800
committerGitHub <noreply@github.com>2017-01-26 10:48:40 -0800
commit16a159acec94fd391e840fab061ed08cf894369f (patch)
tree3418b9e58c9b967171bb5e5138a36cae3384f5c5 /system/api/handlers.go
parent3dea30f62a274db3e0cc95441338b2b71a751198 (diff)
[core] Embedded and implement http.Pusher into http.ResponseWriter+gzip Writer (#47)
* added http Pusher interface to gzip response writer * implement Pusher on gzipResponseWriter and pass encoding header to pusher options * providing a generic error view fuction for code that calls a interface method which will have access to the response * fix []byte -> string type for fmt string * adding the res, req pattern for method arguments in interfaces and their method calls * fix for spacing in generic error message * remove default error views displayed in lifecycle hooks - will rely on custom views or redirects inside hook now that user has ResponseWriter. Otherwise, multiple WriteHeader calls would be warned * removing WriteHeader calls before return in external handlers * bump version 0.8.1
Diffstat (limited to 'system/api/handlers.go')
-rw-r--r--system/api/handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/api/handlers.go b/system/api/handlers.go
index 2e70fdc..91b10f9 100644
--- a/system/api/handlers.go
+++ b/system/api/handlers.go
@@ -180,7 +180,7 @@ func contentHandlerBySlug(res http.ResponseWriter, req *http.Request) {
func hide(it interface{}, res http.ResponseWriter, req *http.Request) bool {
// check if should be hidden
if h, ok := it.(item.Hideable); ok {
- err := h.Hide(req)
+ err := h.Hide(res, req)
if err == item.ErrAllowHiddenItem {
return false
}