Skip to content

Commit 2f8351b

Browse files
committed
fix(captcha): If no operation previously, it is considered to be the first operation.
1 parent a00c781 commit 2f8351b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

internal/service/action/captcha_strategy.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ func (cs *CaptchaService) ValidationStrategy(ctx context.Context, unit, actionTy
1717
log.Error(err)
1818
return false
1919
}
20+
// If no operation previously, it is considered to be the first operation
2021
if info == nil {
21-
info = &entity.ActionRecordInfo{
22-
LastTime: time.Now().Unix(),
23-
Num: 1,
24-
}
22+
return true
2523
}
2624
switch actionType {
2725
case entity.CaptchaActionEmail:

0 commit comments

Comments
 (0)