summaryrefslogtreecommitdiff
path: root/system/admin/handlers.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2017-03-15 13:55:55 -0700
committerGitHub <noreply@github.com>2017-03-15 13:55:55 -0700
commit1a62c2bfe3cec71391e51f0c59b6c008179b7e89 (patch)
tree18a1a89076303acf3d2be40aa4ca371ed27ede3a /system/admin/handlers.go
parent0eaddb8ae0b29937f7514cc83c63e0aa3c377850 (diff)
parent5ec811b5d1899cfe538ed6d19c8a5ee01a553f03 (diff)
Merge pull request #99 from ponzu-cms/ponzu-dev
[core] Add api.Deleteable interface, rename Externalable to Createable and rename methods
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r--system/admin/handlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 4bb5521..a585faa 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -866,7 +866,7 @@ func contentsHandler(res http.ResponseWriter, req *http.Request) {
}
var hasExt bool
- _, ok = pt.(api.Externalable)
+ _, ok = pt.(api.Createable)
if ok {
hasExt = true
}
@@ -1409,7 +1409,7 @@ func approveContentHandler(res http.ResponseWriter, req *http.Request) {
}
if pendingID != "" {
- err = db.DeleteContent(req.FormValue("type")+":"+pendingID, req.Form)
+ err = db.DeleteContent(req.FormValue("type") + ":" + pendingID)
if err != nil {
log.Println("Failed to remove content after approval:", err)
}
@@ -1757,7 +1757,7 @@ func deleteHandler(res http.ResponseWriter, req *http.Request) {
return
}
- err = db.DeleteContent(t+":"+id, req.Form)
+ err = db.DeleteContent(t + ":" + id)
if err != nil {
log.Println(err)
res.WriteHeader(http.StatusInternalServerError)