This commit is contained in:
Mrx
2026-05-07 12:39:37 +08:00
parent 1ca6e1c81d
commit dfd7e86f6c
2 changed files with 3 additions and 2 deletions

View File

@@ -251,7 +251,7 @@ func (m *DailyRateLimitMiddleware) shouldRecordNearLimit(current, max int) bool
if max <= 0 { if max <= 0 {
return false return false
} }
threshold := int(math.Ceil(float64(max) * 0.8)) threshold := int(math.Ceil(float64(max) * 0.9))
if threshold < 1 { if threshold < 1 {
threshold = 1 threshold = 1
} }

View File

@@ -9,8 +9,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/go-playground/validator/v10"
"tyapi-server/internal/shared/pdfvalidate" "tyapi-server/internal/shared/pdfvalidate"
"github.com/go-playground/validator/v10"
) )
// RegisterCustomValidators 注册所有自定义验证器 // RegisterCustomValidators 注册所有自定义验证器