123456789101112131415161718192021222324252627282930 |
- // Package routers
- // @APIVersion 1.0.0
- // @Title 接入统一身份认证demo
- // @Description 接入统一身份认证demo
- // @TermsOfServiceUrl http://127.0.0.1:8083/swagger/swagger.json
- package routers
- import (
- "Medical_ERP/controllers"
- "Medical_ERP/middleware"
- beego "github.com/beego/beego/v2/server/web"
- )
- func init() {
- //跨域
- middleware.CorsMiddle()
- //授权登录中间件
- middleware.AuthMiddle()
- //日志中间件
- middleware.LogMiddle()
- // 更新权限
- beego.Router("/api/role-api", &controllers.RoleApi{}, "*:UpdateRoleApi")
- // 文件上传
- beego.Router("/api/UpFileToken", &controllers.UpFileController{}, "*:ConfigUpFileToken")
- }
|