This commit is contained in:
2025-12-04 10:55:25 +08:00
commit 60992c1e44
19 changed files with 1058 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
package routes
import (
"authorization/handlers"
"authorization/middleware"
"database/sql"
"github.com/gorilla/mux"
httpSwagger "github.com/swaggo/http-swagger"
)
func SetupRoutes(router *mux.Router, db *sql.DB) {
authzRoutes := router.PathPrefix("/v1/auth").Subrouter()
authzRoutes.HandleFunc("/check", middleware.JWTAuth(handlers.AuthorizeHandler)).Methods("POST")
router.PathPrefix("/swagger/").Handler(httpSwagger.WrapHandler)
}