Browse Source

Merge branch 'standalone_develop' into pre_trustie_server

pull/312/head
viletyy 3 years ago
parent
commit
a912106fd6
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      app/controllers/api/v1/users_controller.rb

+ 2
- 0
app/controllers/api/v1/users_controller.rb 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


Loading…
Cancel
Save