less shit

This commit is contained in:
matst80
2024-11-10 18:40:53 +01:00
parent 056bfd9ffe
commit 234d1d53f2

View File

@@ -191,10 +191,11 @@ func main() {
syncedServer := NewPoolServer(syncedPool, name)
mux := http.NewServeMux()
mux.Handle("/api/", http.StripPrefix("/api", syncedServer.Serve()))
mux.HandleFunc("GET /add/remote/{host}", func(w http.ResponseWriter, r *http.Request) {
syncedPool.AddRemote(r.PathValue("host"))
})
mux.HandleFunc("GET /save", app.HandleSave)
// only for local
// mux.HandleFunc("GET /add/remote/{host}", func(w http.ResponseWriter, r *http.Request) {
// syncedPool.AddRemote(r.PathValue("host"))
// })
// mux.HandleFunc("GET /save", app.HandleSave)
mux.Handle("/metrics", promhttp.Handler())
sigs := make(chan os.Signal, 1)