diff options
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index fed77f7..55a5f30 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -71,6 +71,7 @@ func initHandler(res http.ResponseWriter, req *http.Request) { etag := db.NewEtag() req.Form.Set("etag", etag) + // create and save admin user email := strings.ToLower(req.FormValue("email")) password := req.FormValue("password") usr := user.NewUser(email, password) @@ -82,6 +83,10 @@ func initHandler(res http.ResponseWriter, req *http.Request) { return } + // set HTTP port which should be previously added to config cache + port := db.ConfigCache("http_port") + req.Form.Set("http_port", port) + // set initial user email as admin_email and make config req.Form.Set("admin_email", email) err = db.SetConfig(req.Form) |