refactor(web): make a separate auth middlewares for server

also slightly change api auth middleware
This commit is contained in:
2025-01-07 04:32:49 +03:00
parent 8b417dc623
commit 2228dc5f14
4 changed files with 20 additions and 10 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ func Serve(addr string) {
r.Static("/static", "./static")
r.GET("/", api.MiddlewareAuth, root)
r.GET("/quotes", api.MiddlewareAuth, quotes)
r.GET("/quotes", api.MiddlewareAuth, middlewareAuth, quotes)
r.Run(addr)
}