feat: 实现数据库备份与恢复

This commit is contained in:
kanzihuang
2023-12-27 22:59:20 +08:00
committed by wanli
parent 1a7d425f60
commit e344722794
92 changed files with 5997 additions and 69 deletions

View File

@@ -10,6 +10,7 @@ import (
"mayfly-go/pkg/model"
"mayfly-go/pkg/rediscli"
"mayfly-go/pkg/utils/anyx"
"strings"
"time"
)
@@ -44,6 +45,8 @@ func PermissionHandler(rc *Ctx) error {
return nil
}
tokenStr := rc.GinCtx.Request.Header.Get("Authorization")
// 删除前缀 Bearer, 以支持 Bearer Token
tokenStr, _ = strings.CutPrefix(tokenStr, "Bearer ")
// header不存在则从查询参数token中获取
if tokenStr == "" {
tokenStr = rc.GinCtx.Query("token")