From 71862ba6d6fe964a11b0da3de8270a7514b0942f Mon Sep 17 00:00:00 2001 From: yystopf Date: Wed, 19 Apr 2023 10:26:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/users_controller.rb | 2 +- app/services/info_risk_control_service.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index f5ea37a90..a37db2524 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -9,7 +9,7 @@ class Api::V1::UsersController < Api::V1::BaseController mail = params[:email] code_type = params[:code_type] - status, message = InfoRiskControlService.call(0, request.remote_ip) + status, message = InfoRiskControlService.call(mail, request.remote_ip) tip_exception(420, message) if status == 0 sign = Digest::MD5.hexdigest("#{OPENKEY}#{mail}") diff --git a/app/services/info_risk_control_service.rb b/app/services/info_risk_control_service.rb index f07b30c48..f8bd993b5 100644 --- a/app/services/info_risk_control_service.rb +++ b/app/services/info_risk_control_service.rb @@ -14,12 +14,12 @@ class InfoRiskControlService < ApplicationService def call if receiver == "" remote_ip_minute_risk_control - remote_ip_risk_control if @status = 1 + remote_ip_risk_control if @status == 1 else remote_ip_minute_risk_control - remote_ip_risk_control if @status = 1 - minute_risk_control - day_risk_control if @status = 1 + remote_ip_risk_control if @status == 1 + minute_risk_control + day_risk_control if @status == 1 end return @status, @message