refactor🎨: 开放接口无需认证

This commit is contained in:
wenjianzhang
2021-06-11 17:30:17 +08:00
parent 7b6e57b8dd
commit cc0dab3cd0
5 changed files with 21 additions and 12 deletions
+7 -3
View File
@@ -12,10 +12,14 @@ func init() {
}
func sysNoCheckRoleRouter(v1 *gin.RouterGroup ,authMiddleware *jwt.GinJWTMiddleware) {
r := v1.Group("").Use(authMiddleware.MiddlewareFunc())
r1 := v1.Group("")
{
sys := apis.System{}
r.GET("/getCaptcha", sys.GenerateCaptchaHandler)
r1.GET("/getCaptcha", sys.GenerateCaptchaHandler)
}
r := v1.Group("").Use(authMiddleware.MiddlewareFunc())
{
gen := tools.Gen{}
r.GET("/gen/preview/:tableId", gen.Preview)
r.GET("/gen/toproject/:tableId", gen.GenCode)
@@ -49,4 +53,4 @@ func registerSysTableRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddl
tablesInfo.GET("", sysTable.GetSysTablesInfo)
}
}
}
}
+1 -1
View File
@@ -28,7 +28,7 @@ func registerSysConfigRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMidd
r1.GET("/:configKey", api.GetSysConfigByKEYForService)
}
r2 := v1.Group("/app-config").Use(authMiddleware.MiddlewareFunc())
r2 := v1.Group("/app-config")
{
r2.GET("", api.GetSysConfigBySysApp)
}