🐛 fix the casbin invalidation bug/adjust routing strategy

This commit is contained in:
landaiqing
2024-09-04 18:58:13 +08:00
parent b6dafddce1
commit 2eb9c3ac68
24 changed files with 243 additions and 113 deletions

View File

@@ -8,10 +8,10 @@ import (
"schisandra-cloud-album/global"
)
func SwaggerRouter(router *gin.Engine) {
func SwaggerRouter(router *gin.RouterGroup) {
docs.SwaggerInfo.BasePath = ""
docs.SwaggerInfo.Description = global.CONFIG.Swagger.Description
router.GET("/api/doc/*any", gin.BasicAuth(gin.Accounts{
router.GET("/doc/*any", gin.BasicAuth(gin.Accounts{
global.CONFIG.Swagger.User: global.CONFIG.Swagger.Password,
}), ginSwagger.WrapHandler(swaggerFiles.Handler, func(config *ginSwagger.Config) {
config.Title = global.CONFIG.Swagger.Title