summaryrefslogtreecommitdiff
path: root/system/admin
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-12-19 09:03:29 -0800
committerSteve Manuel <nilslice@gmail.com>2016-12-19 09:03:29 -0800
commit2696dc4b3c951b84aa398dd12a76016f085b2bfe (patch)
tree855b65920a9ca280f90ac68ea3cf8d5257b07ef4 /system/admin
parent7bf8aa5271945eb52e8db6f0c962d3a852b51e0a (diff)
contin. debugging host port issue in config
Diffstat (limited to 'system/admin')
-rw-r--r--system/admin/config/config.go7
-rw-r--r--system/admin/handlers.go1
2 files changed, 7 insertions, 1 deletions
diff --git a/system/admin/config/config.go b/system/admin/config/config.go
index 6c315f5..ab17425 100644
--- a/system/admin/config/config.go
+++ b/system/admin/config/config.go
@@ -5,7 +5,7 @@ import (
"github.com/bosssauce/ponzu/system/item"
)
-//Config represents the confirgurable options of the system
+// Config represents the confirgurable options of the system
type Config struct {
item.Item
editor editor.Editor
@@ -41,6 +41,11 @@ func (c *Config) MarshalEditor() ([]byte, error) {
}),
},
editor.Field{
+ View: editor.Input("HTTPPort", c, map[string]string{
+ "type": "hidden",
+ }),
+ },
+ editor.Field{
View: editor.Input("AdminEmail", c, map[string]string{
"label": "Adminstrator Email (will be notified of internal system information)",
}),
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 85c1f8b..b9408cf 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -85,6 +85,7 @@ func initHandler(res http.ResponseWriter, req *http.Request) {
// set HTTP port which should be previously added to config cache
port := db.ConfigCache("http_port")
+ fmt.Println("port from config (init handler)", port)
req.Form.Set("http_port", port)
// set initial user email as admin_email and make config