From 7fc144bee449641fb7d135cd6fdf59c8f5869a80 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 8 Nov 2016 17:01:53 -0800 Subject: adding remaining methods to Item for Hookable implementation and adding hooks to external submissions --- content/item.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'content') diff --git a/content/item.go b/content/item.go index 046ed04..cbf38af 100644 --- a/content/item.go +++ b/content/item.go @@ -55,6 +55,16 @@ func (i *Item) AfterDelete(req *http.Request) error { return nil } +// BeforeReject is a no-op to ensure structs which embed Item implement Hookable +func (i *Item) BeforeReject(req *http.Request) error { + return nil +} + +// AfterReject is a no-op to ensure structs which embed Item implement Hookable +func (i *Item) AfterReject(req *http.Request) error { + return nil +} + // Sluggable makes a struct locatable by URL with it's own path // As an Item implementing Sluggable, slugs may overlap. If this is an issue, // make your content struct (or one which imbeds Item) implement Sluggable -- cgit v1.2.3