dashboard: can now change the sidebar

This commit is contained in:
nemunaire 2019-01-19 08:01:29 +01:00
parent 196f10dc9f
commit a4e0a90adf
7 changed files with 410 additions and 57 deletions

View file

@ -51,6 +51,9 @@ func init() {
w.Header().Set("Cache-Control", "no-cache")
http.ServeFile(w, r, path.Join(TeamsDir, "public", "stats.json"))
})
api.Router().GET("/api/teams/:tid/stats.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
http.Redirect(w, r, "http://127.0.0.1:8081/api/teams/" + string(ps.ByName("tid")) + "/stats.json", 302)
})
api.Router().GET("/settings.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
w.Header().Set("X-FIC-Time", fmt.Sprintf("%f", float64(time.Now().UnixNano()/1000)/1000000))
w.Header().Set("Cache-Control", "no-cache")