fix bind email

dev_forum
p31729568 6 years ago
parent 910399013d
commit 23ee7debfb

@ -2,7 +2,7 @@ module Searchable::Shixun
extend ActiveSupport::Concern
included do
searchkick language: 'chinese'#, callbacks: :async
searchkick language: 'chinese', callbacks: :async
scope :search_import, -> { includes(:shixun_info, :challenges, :challenge_tags, :users, user: { user_extension: :school }) }
end

@ -13,7 +13,7 @@ class Users::BindEmailService < ApplicationService
raise Error, '该邮箱已被绑定' if User.where.not(id: user.id).exists?(mail: params[:email])
code = VerificationCode.where(mail: params[:email], code: params[:code], code_type: 4).last
code = VerificationCode.where(email: params[:email], code: params[:code], code_type: 4).last
raise Error, '验证码无效' unless code&.effective?
ActiveRecord::Base.transaction do

Loading…
Cancel
Save