use Chi Router instead of Chi Mux.

This commit is contained in:
Miroslav Šedivý 2020-11-14 18:16:25 +01:00
parent a18482b54e
commit 40b986c8be
7 changed files with 13 additions and 143 deletions

View file

@ -26,9 +26,7 @@ func New(
}
}
func (h *RoomHandler) Router() *chi.Mux {
r := chi.NewRouter()
func (h *RoomHandler) Route(r chi.Router) {
// TODO: Authorizaton.
r.Route("/screen", func(r chi.Router) {
r.Get("/", h.ScreenConfiguration)
@ -41,6 +39,4 @@ func (h *RoomHandler) Router() *chi.Mux {
r.Get("/", h.ClipboardRead)
r.Post("/", h.ClipboardWrite)
})
return r
}