From 07fe1b15899fa6439e587984d6183371f9a6877c Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Wed, 15 Mar 2017 11:01:28 -0700 Subject: changing API for external client interaction. Externalable -> Createable, +Deleteable, changing Hookable interface methods to conform to pattern: BeforeAPI$ACTION, etc. --- system/api/handlers.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'system/api/handlers.go') diff --git a/system/api/handlers.go b/system/api/handlers.go index 4a9eaff..83bbe43 100644 --- a/system/api/handlers.go +++ b/system/api/handlers.go @@ -2,6 +2,7 @@ package api import ( "encoding/json" + "errors" "log" "net/http" "strconv" @@ -11,6 +12,9 @@ import ( "github.com/ponzu-cms/ponzu/system/item" ) +// ErrNoAuth should be used to report failed auth requests +var ErrNoAuth = errors.New("Auth failed for request") + // deprecating from API, but going to provide code here in case someone wants it func typesHandler(res http.ResponseWriter, req *http.Request) { var types = []string{} -- cgit v1.2.3