init
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user