15ttl
Build docker and publish / build (20.15.1) (push) Successful in 6m0s

This commit is contained in:
2026-01-09 00:43:52 -08:00
parent 7b33ab6e2a
commit d45f4417ed
7 changed files with 24 additions and 12 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ func (l *SendEmailCodeLogic) SendEmailCode(req *types.SendCodeRequest) (resp *ty
"Type": req.Type,
"SiteLogo": l.svcCtx.Config.Site.SiteLogo,
"SiteName": l.svcCtx.Config.Site.SiteName,
"Expire": 5,
"Expire": 15,
"Code": code,
}
// Save to Redis
@@ -101,7 +101,7 @@ func (l *SendEmailCodeLogic) SendEmailCode(req *types.SendCodeRequest) (resp *ty
}
// Marshal the payload
val, _ := json.Marshal(payload)
if err = l.svcCtx.Redis.Set(l.ctx, cacheKey, string(val), time.Minute*10).Err(); err != nil {
if err = l.svcCtx.Redis.Set(l.ctx, cacheKey, string(val), time.Minute*15).Err(); err != nil {
l.Errorw("[SendEmailCode]: Redis Error", logger.Field("error", err.Error()), logger.Field("cacheKey", cacheKey))
return nil, errors.Wrap(xerr.NewErrCode(xerr.ERROR), "Failed to set verification code")
}