summaryrefslogtreecommitdiff
path: root/system/admin
diff options
context:
space:
mode:
Diffstat (limited to 'system/admin')
-rw-r--r--system/admin/config/config.go2
-rw-r--r--system/admin/handlers.go2
-rw-r--r--system/admin/server.go3
3 files changed, 5 insertions, 2 deletions
diff --git a/system/admin/config/config.go b/system/admin/config/config.go
index a028ebf..ba12515 100644
--- a/system/admin/config/config.go
+++ b/system/admin/config/config.go
@@ -79,7 +79,7 @@ func (c *Config) MarshalEditor() ([]byte, error) {
View: editor.Checkbox("DisableCORS", c, map[string]string{
"label": "Disable CORS (so only " + c.Domain + " can fetch your data)",
}, map[string]string{
- "on": "Disable",
+ "true": "Disable",
}),
},
editor.Field{
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 00add87..2bea356 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -1533,7 +1533,7 @@ func editHandler(res http.ResponseWriter, req *http.Request) {
// create a timestamp if one was not set
if ts == "" {
- ts := fmt.Sprintf("%d", int64(time.Nanosecond)*time.Now().UnixNano()/int64(time.Millisecond))
+ ts = fmt.Sprintf("%d", int64(time.Nanosecond)*time.Now().UnixNano()/int64(time.Millisecond))
req.PostForm.Set("timestamp", ts)
}
diff --git a/system/admin/server.go b/system/admin/server.go
index 991f2d2..8b759e4 100644
--- a/system/admin/server.go
+++ b/system/admin/server.go
@@ -1,6 +1,7 @@
package admin
import (
+ "fmt"
"log"
"net/http"
"os"
@@ -54,4 +55,6 @@ func Run() {
http.Handle("/api/uploads/", api.Record(api.CORS(db.CacheControl(
http.StripPrefix("/api/uploads/", http.FileServer(
restrict(http.Dir(uploadsDir))))))))
+
+ fmt.Println("Admin routes registered.")
}