dashboard: move public.json files into a dedicated directory
This commit is contained in:
parent
485ffafc9a
commit
7970b552e9
5 changed files with 25 additions and 22 deletions
|
@ -61,46 +61,46 @@ func init() {
|
|||
|
||||
api.Router().GET("/public.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public.json"))
|
||||
})
|
||||
api.Router().GET("/public0.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public0.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public0.json"))
|
||||
})
|
||||
api.Router().GET("/public1.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public1.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public1.json"))
|
||||
})
|
||||
api.Router().GET("/public2.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public2.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public2.json"))
|
||||
})
|
||||
api.Router().GET("/public3.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public3.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public3.json"))
|
||||
})
|
||||
api.Router().GET("/public4.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public4.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public4.json"))
|
||||
})
|
||||
api.Router().GET("/public5.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public5.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public5.json"))
|
||||
})
|
||||
api.Router().GET("/public6.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public6.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public6.json"))
|
||||
})
|
||||
api.Router().GET("/public7.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public7.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public7.json"))
|
||||
})
|
||||
api.Router().GET("/public8.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public8.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public8.json"))
|
||||
})
|
||||
api.Router().GET("/public9.json", func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
http.ServeFile(w, r, path.Join(TeamsDir, "public", "public9.json"))
|
||||
http.ServeFile(w, r, path.Join(DashboardDir, "public9.json"))
|
||||
})
|
||||
}
|
||||
|
|
Reference in a new issue