Commit 2573107b authored by wucm667's avatar wucm667
Browse files

refactor: 将 ComputeQuotaResetAt 和 ValidateQuotaResetConfig 函数中的 map 类型从...

refactor: 将 ComputeQuotaResetAt 和 ValidateQuotaResetConfig 函数中的 map 类型从 map[string]interface{} 修改为 map[string]any
parent 5b850059
...@@ -1405,7 +1405,7 @@ func (a *Account) isFixedWeeklyPeriodExpired(periodStart time.Time) bool { ...@@ -1405,7 +1405,7 @@ func (a *Account) isFixedWeeklyPeriodExpired(periodStart time.Time) bool {
// ComputeQuotaResetAt 根据当前配置计算并填充 extra 中的 quota_daily_reset_at / quota_weekly_reset_at // ComputeQuotaResetAt 根据当前配置计算并填充 extra 中的 quota_daily_reset_at / quota_weekly_reset_at
// 在保存账号配置时调用 // 在保存账号配置时调用
func ComputeQuotaResetAt(extra map[string]interface{}) { func ComputeQuotaResetAt(extra map[string]any) {
now := time.Now() now := time.Now()
tzName, _ := extra["quota_reset_timezone"].(string) tzName, _ := extra["quota_reset_timezone"].(string)
if tzName == "" { if tzName == "" {
...@@ -1449,7 +1449,7 @@ func ComputeQuotaResetAt(extra map[string]interface{}) { ...@@ -1449,7 +1449,7 @@ func ComputeQuotaResetAt(extra map[string]interface{}) {
} }
// ValidateQuotaResetConfig 校验配额固定重置时间配置的合法性 // ValidateQuotaResetConfig 校验配额固定重置时间配置的合法性
func ValidateQuotaResetConfig(extra map[string]interface{}) error { func ValidateQuotaResetConfig(extra map[string]any) error {
if extra == nil { if extra == nil {
return nil return nil
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment