dashboard: add graph score
This commit is contained in:
parent
d66de6fb3c
commit
b9fa5accff
5 changed files with 216 additions and 8 deletions
|
@ -93,12 +93,11 @@ func init() {
|
|||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "my.json"))
|
||||
}
|
||||
})
|
||||
api.Router().GET("/stats.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
api.Router().GET("/api/teams/:tid/score-grid.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
if forwarder != nil {
|
||||
fwd_request(w, r, *forwarder)
|
||||
} else {
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "stats.json"))
|
||||
fwd_request(w, r, "http://127.0.0.1:8081/")
|
||||
}
|
||||
})
|
||||
api.Router().GET("/api/teams/:tid/stats.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
|
|
Reference in a new issue