Merge branch 'develop' into standalone_develop
This commit is contained in:
commit
2548b0e9c0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue