summaryrefslogtreecommitdiff
path: root/system/admin/handlers.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-11 18:58:16 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-11 18:58:16 -0800
commitcb844b1e9c4405f06808c517f03362608fb3d246 (patch)
treed5a67be092f3819578f86ce2dd3698f2a6db4616 /system/admin/handlers.go
parentda6ccd6f7b0a0f177efbe21f08bcf04377b7e044 (diff)
adding package prefix
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r--system/admin/handlers.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 8376277..5d71262 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -14,6 +14,7 @@ import (
"github.com/ponzu-cms/ponzu/management/editor"
"github.com/ponzu-cms/ponzu/management/manager"
+ "github.com/ponzu-cms/ponzu/system/addon"
"github.com/ponzu-cms/ponzu/system/admin/config"
"github.com/ponzu-cms/ponzu/system/admin/upload"
"github.com/ponzu-cms/ponzu/system/admin/user"
@@ -2074,7 +2075,7 @@ func addonsHandler(res http.ResponseWriter, req *http.Request) {
switch action {
case "enable":
- err := Enable(id)
+ err := addon.Enable(id)
if err != nil {
log.Println(err)
res.WriteHeader(http.StatusInternalServerError)
@@ -2087,7 +2088,7 @@ func addonsHandler(res http.ResponseWriter, req *http.Request) {
return
}
case "disable":
- err := Disable(id)
+ err := addon.Disable(id)
if err != nil {
log.Println(err)
res.WriteHeader(http.StatusInternalServerError)
@@ -2143,7 +2144,7 @@ func addonHandler(res http.ResponseWriter, req *http.Request) {
return
}
- _, ok := Types[id]
+ _, ok := addon.Types[id]
if !ok {
log.Println("Addon: ", id, "is not found in addon.Types map")
res.WriteHeader(http.StatusNotFound)
@@ -2156,7 +2157,7 @@ func addonHandler(res http.ResponseWriter, req *http.Request) {
return
}
- m, err := Manage(data, id)
+ m, err := addon.Manage(data, id)
if err != nil {
log.Println(err)
res.WriteHeader(http.StatusInternalServerError)
@@ -2197,7 +2198,7 @@ func addonHandler(res http.ResponseWriter, req *http.Request) {
name := req.FormValue("addon_name")
id := req.FormValue("addon_reverse_dns")
- at, ok := Types[id]
+ at, ok := addon.Types[id]
if !ok {
log.Println("Error: addon", name, "has no record in addon.Types map at", id)
res.WriteHeader(http.StatusBadRequest)
@@ -2262,7 +2263,7 @@ func adminAddonListItem(data []byte) []byte {
var action string
var buttonClass string
- if status != StatusEnabled {
+ if status != addon.StatusEnabled {
action = "Enable"
buttonClass = "green"
} else {