server: implement channels

This commit is contained in:
2026-05-24 00:32:15 +00:00
parent bd6c0bf211
commit 35cda247f2
4 changed files with 248 additions and 0 deletions
+11
View File
@@ -25,6 +25,17 @@ func Start() {
r.Get("/", Whoami)
})
r.Route("/channels", func(r chi.Router) {
r.Use(SessionAuthMiddleware)
r.Get("/", ListChannels)
r.Post("/", NewChannel)
r.Route("/{channelID}", func(r chi.Router) {
r.Get("/", GetChannel)
r.Delete("/", DeleteChannel)
})
})
r.Route("/users", func(r chi.Router) {
r.Use(SessionAuthMiddleware)