refactor: drop sqlite fallback and admin mode

This commit is contained in:
icy
2025-11-06 17:52:30 +08:00
parent 4fa582428e
commit b15b0fb01a
27 changed files with 293 additions and 2123 deletions

View File

@@ -14,9 +14,6 @@ import (
// JWTSecret JWT密钥将从配置中动态设置
var JWTSecret []byte
// AdminMode 管理员模式标志
var AdminMode bool = false
// OTPIssuer OTP发行者名称
const OTPIssuer = "nofxAI"
@@ -25,16 +22,6 @@ func SetJWTSecret(secret string) {
JWTSecret = []byte(secret)
}
// SetAdminMode 设置管理员模式
func SetAdminMode(enabled bool) {
AdminMode = enabled
}
// IsAdminMode 检查是否为管理员模式
func IsAdminMode() bool {
return AdminMode
}
// Claims JWT声明
type Claims struct {
UserID string `json:"user_id"`