summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/admin/config/config.go7
-rw-r--r--system/admin/handlers.go1
-rw-r--r--system/db/config.go2
3 files changed, 8 insertions, 2 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
diff --git a/system/db/config.go b/system/db/config.go
index 7873a55..8168257 100644
--- a/system/db/config.go
+++ b/system/db/config.go
@@ -121,7 +121,7 @@ func ConfigAll() ([]byte, error) {
// PutConfig updates a single k/v in the config
func PutConfig(key string, value interface{}) error {
- fmt.Println(key, value)
+ fmt.Println("PutConfig:", key, value)
kv := make(map[string]interface{})
c, err := ConfigAll()