diff --git a/http/admin/handler.go b/http/admin/handler.go
index 6555551..763e4b4 100644
--- a/http/admin/handler.go
+++ b/http/admin/handler.go
@@ -56,6 +56,7 @@ func AdminRouter(r chi.Router) {
r.Post("/new_admin.sh", handleNewAdmin)
r.Post("/del_admin.sh", handleDelAdmin)
r.Get("/status.sh", serveStatus)
+ r.Post("/set_rules.sh", handleSetRules)
}
// Router sets up moderation functions
diff --git a/http/admin/newboard.go b/http/admin/newboard.go
index ef707bd..4a55f7a 100644
--- a/http/admin/newboard.go
+++ b/http/admin/newboard.go
@@ -24,7 +24,9 @@ func handleNewBoard(w http.ResponseWriter, r *http.Request) {
}
db := middle.GetDB(r)
- var board = &resources.Board{}
+ var board = &resources.Board{
+ Metadata: map[string]string{},
+ }
board.ShortName = r.FormValue("shortname")
board.LongName = r.FormValue("longname")
@@ -34,7 +36,7 @@ func handleNewBoard(w http.ResponseWriter, r *http.Request) {
return
}
- if board.ShortName == "admin" || board.ShortName == "@" || board.ShortName == "mod"{
+ if board.ShortName == "admin" || board.ShortName == "@" || board.ShortName == "mod" {
errw.ErrorWriter(errors.New("No"), w, r)
}
diff --git a/http/admin/res/panel.html b/http/admin/res/panel.html
index 4721d13..1bbd2f8 100644
--- a/http/admin/res/panel.html
+++ b/http/admin/res/panel.html
@@ -21,7 +21,7 @@