fixed dashboard stats update

This commit is contained in:
yusing
2024-10-04 18:52:31 +08:00
parent abbcbad5e9
commit b06cbc0fee
6 changed files with 54 additions and 9 deletions

View File

@@ -34,6 +34,7 @@ func NewHandler(cfg *config.Config) http.Handler {
mux.HandleFunc("POST", "/v1/file/{filename...}", v1.SetFileContent)
mux.HandleFunc("PUT", "/v1/file/{filename...}", v1.SetFileContent)
mux.HandleFunc("GET", "/v1/stats", wrap(cfg, v1.Stats))
mux.HandleFunc("GET", "/v1/stats/ws", wrap(cfg, v1.StatsWS))
mux.HandleFunc("GET", "/v1/error_page", error_page.GetHandleFunc())
return mux
}