added twitch frontend components

This commit is contained in:
2025-08-28 14:40:04 +02:00
parent 2a11f64935
commit 22caf8899b
10 changed files with 302 additions and 5 deletions

View File

@@ -251,8 +251,9 @@ func newServer(c serverConfig) *http.Server {
// Twitch
r.Route("/twitch", func(r chi.Router) {
r.Use(middlewares.ApplyAuthenticationByConfig)
r.Get("/all", twitch.GetMonitoredUsers(c.tm))
r.Post("/add", twitch.MonitorUserHandler(c.tm))
r.Get("/users", twitch.GetMonitoredUsers(c.tm))
r.Post("/user", twitch.MonitorUserHandler(c.tm))
r.Delete("/user/{user}", twitch.DeleteUser(c.tm))
})
return &http.Server{Handler: r}