mirror of https://gitee.com/answerdev/answer.git
fix(captcha): If no operation previously, it is considered to be the first operation.
This commit is contained in:
parent
a00c781295
commit
2f8351bb8e
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue