fix bind email

dev_forum
p31729568 6 years ago
parent 41cc9440d4
commit d0105922a6

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

Loading…
Cancel
Save