diff --git a/internal/service/action/captcha_strategy.go b/internal/service/action/captcha_strategy.go index 09555f87..4208773e 100644 --- a/internal/service/action/captcha_strategy.go +++ b/internal/service/action/captcha_strategy.go @@ -17,11 +17,9 @@ func (cs *CaptchaService) ValidationStrategy(ctx context.Context, unit, actionTy log.Error(err) return false } + // If no operation previously, it is considered to be the first operation if info == nil { - info = &entity.ActionRecordInfo{ - LastTime: time.Now().Unix(), - Num: 1, - } + return true } switch actionType { case entity.CaptchaActionEmail: