samba/server/db/handler/maintain.go
2025-06-04 09:51:39 +08:00

32 lines
767 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package handler
import (
"context"
)
func checkMaintain(ctx context.Context, uid int64) bool {
_ = ctx
_ = uid
// 检查停服标识
// isMaintaining, err := repo.IsMaintaining(ctx)
// if err != nil {
// log.Warn(fmt.Sprintf("fail to IsMaintaining, ship. err: %s", err))
// return false
// }
// if !isMaintaining {
// log.Warn("is not maintaining, ship")
// return false
// }
// if uid == 0 {
// return true // 正常token中一定有uid异常情况直接视作不在白名单中
// }
// // 检查是否在白名单中
// inWhitelist, err := repo.InMaintainWhitelist(ctx, uid)
// if err != nil {
// log.Warn(fmt.Sprintf("fail to InMaintainWhitelist, ship. err: %s", err))
// return false
// }
// return !inWhitelist
return false
}