From 9ffc6f115deef547ae07a0837ef2cd1a70a5dd0f Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 18 Oct 2016 14:12:01 -0700 Subject: updating call location of StoreContent to be centralized to db actions, rather than inside http handlers --- system/admin/handlers.go | 2 -- system/db/content.go | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 17a4843..edf351d 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -498,8 +498,6 @@ func editHandler(res http.ResponseWriter, req *http.Request) { return } - go db.SortContent(t) - scheme := req.URL.Scheme host := req.URL.Host path := req.URL.Path diff --git a/system/db/content.go b/system/db/content.go index 890c7d6..caa2af3 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -65,6 +65,8 @@ func update(ns, id string, data url.Values) (int, error) { return 0, nil } + go SortContent(ns) + return cid, nil } @@ -105,6 +107,8 @@ func insert(ns string, data url.Values) (int, error) { return 0, err } + go SortContent(ns) + return effectedID, nil } @@ -154,6 +158,8 @@ func DeleteContent(target string) error { return err } + go SortContent(ns) + return nil } -- cgit v1.2.3