Merge branch 'develop' into standalone_develop

This commit is contained in:
viletyy 2022-10-27 17:58:27 +08:00
commit 2548b0e9c0
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ class Api::V1::UsersController < Api::V1::BaseController
tip_exception(-2,"邮件发送失败,请稍后重试")
end
ver_params = {code_type: code_type, code: verification_code, email: mail}
last_code = VerificationCode.where(code_type: code_type, email: mail).last
last_code.update_attributes!({created_at: Time.current - 10.minute}) if last_code.present?
data = VerificationCode.new(ver_params)
if data.save!
render_ok