From 3499ffd6269d8934406b53e8f8d3a9b139c15a4e Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 8 Apr 2019 18:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/account_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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