diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 21b22de2..7258b076 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -685,7 +685,7 @@ class AccountController < ApplicationController else code = VerificationCode.where(:email => params[:phone], :code => params[:code], :code_type => params[:type].to_i).last end - + req[:valid] = !code.nil? && (Time.now.to_i - code.created_at.to_i) <= 10*60 end render :json => req end