add settings update to API.

This commit is contained in:
Miroslav Šedivý 2022-03-27 00:26:25 +01:00
parent 7d53e59945
commit 58fca708a7
2 changed files with 30 additions and 0 deletions

View file

@ -55,6 +55,11 @@ func New(
}
func (h *RoomHandler) Route(r types.Router) {
r.With(auth.AdminsOnly).Route("/settings", func(r types.Router) {
r.Post("/", h.settingsSet)
r.Get("/", h.settingsGet)
})
r.With(auth.AdminsOnly).Route("/broadcast", func(r types.Router) {
r.Get("/", h.broadcastStatus)
r.Post("/start", h.boradcastStart)
@ -108,6 +113,7 @@ func (h *RoomHandler) Route(r types.Router) {
r.Post("/dialog", h.uploadDialogPost)
r.Delete("/dialog", h.uploadDialogClose)
})
}
func (h *RoomHandler) uploadMiddleware(w http.ResponseWriter, r *http.Request) (context.Context, error) {