dev_haigong
cxt 6 years ago
parent 66a1a9027a
commit 3499ffd626

@ -685,7 +685,7 @@ class AccountController < ApplicationController
else else
code = VerificationCode.where(:email => params[:phone], :code => params[:code], :code_type => params[:type].to_i).last code = VerificationCode.where(:email => params[:phone], :code => params[:code], :code_type => params[:type].to_i).last
end end
req[:valid] = !code.nil? && (Time.now.to_i - code.created_at.to_i) <= 10*60
end end
render :json => req render :json => req
end end

Loading…
Cancel
Save