m
This commit is contained in:
1 parent
76a6c81af2
commit
b19d083031
68 files changed
+3889
-343
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"base-framework/internal/app/api"
|
||||
"base-framework/pkg/middleware"
|
||||
"base-framework/pkg/router"
|
||||
)
|
||||
|
||||
func InitAppRouter() *router.Router {
|
||||
r := router.NewRouter()
|
||||
|
||||
r.Use(middleware.Routinex())
|
||||
r.Use(middleware.Error())
|
||||
r.Use(middleware.Auth()).ExcludePaths("/auth/login")
|
||||
r.Use(middleware.Logger())
|
||||
|
||||
initApi(r)
|
||||
return r
|
||||
}
|
||||
|
||||
func initApi(r *router.Router) {
|
||||
api.InitTest(r)
|
||||
api.InitAuth(r)
|
||||
}
|
||||
Reference in new issue
Block a user