add control give & control take endpoints.

This commit is contained in:
Miroslav Šedivý 2020-11-18 21:10:40 +01:00
parent 6d27b0a69c
commit 6fbb1a2cc7
2 changed files with 44 additions and 0 deletions

View file

@ -50,5 +50,8 @@ func (h *RoomHandler) Route(r chi.Router) {
r.Route("/control", func(r chi.Router) {
r.Post("/request", h.ControlRequest)
r.Post("/release", h.ControlRelease)
r.With(auth.AdminsOnly).Post("/take", h.ControlTake)
r.With(auth.AdminsOnly).Post("/give", h.ControlGive)
})
}