Browse Source

Merge branch 'develop' into standalone_develop

pull/313/head
viletyy 3 years ago
parent
commit
292167b47e
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      app/services/api/v1/users/update_email_service.rb

+ 4
- 2
app/services/api/v1/users/update_email_service.rb View File

@@ -20,8 +20,10 @@ class Api::V1::Users::UpdateEmailService < ApplicationService
def call
raise Error, errors.full_messages.join(",") unless valid?
raise Error, "密码不正确." unless @user.check_password?(@password)
raise Error, "验证码不正确." if @verify_code&.code != @code
raise Error, "验证码已失效." if !@verify_code&.effective?
if !(code == "123123" && EduSetting.get("code_debug")) # 万能验证码,用于测试 # TODO 万能验证码,用于测试
raise Error, "验证码不正确." if @verify_code&.code != @code
raise Error, "验证码已失效." if !@verify_code&.effective?
end

# begin
ActiveRecord::Base.transaction do


Loading…
Cancel
Save