add auth api router, change block api router, fix ussue with "*"
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"git.oblat.lv/alex/triggerssmith/api/auth"
|
||||
"git.oblat.lv/alex/triggerssmith/api/block"
|
||||
"git.oblat.lv/alex/triggerssmith/internal/config"
|
||||
"git.oblat.lv/alex/triggerssmith/internal/vars"
|
||||
@@ -51,7 +52,8 @@ func (r *Router) RouteHandler() chi.Router {
|
||||
}
|
||||
|
||||
r.r.Route("/api", func(api chi.Router) {
|
||||
api.Get("/block/*", block.LoadHtmlBlock(r.cfg))
|
||||
api.Route("/block", block.Route(r.cfg))
|
||||
api.Route("/auth", auth.Route(r.cfg))
|
||||
})
|
||||
|
||||
r.r.Get("/health", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user