From ee3a14fa280cf205bf61a29c813f6ed027f36d52 Mon Sep 17 00:00:00 2001 From: xiaoxiaoqiong Date: Tue, 24 May 2022 10:34:31 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 98da1b880..ad211d42c 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -332,10 +332,10 @@ class UsersController < ApplicationController def sso_login if params[:login].present? && !current_user.logged? && params[:websiteName].present? - params = { "login" => "#{params[:login]}", "private_token" => "hriEn3UwXfJs3PmyXnSH" } - api_url= "https://pre-data.educoder.net" + req_params = { "login" => "#{params[:login]}", "private_token" => "hriEn3UwXfJs3PmyXnSH" } + api_url= "https://data.educoder.net" client = Faraday.new(url: api_url) - response = client.public_send("get", "/api/sources/get_user_info_by_login", params) + response = client.public_send("get", "/api/sources/get_user_info_by_login", req_params) result = JSON.parse(response.body) if result["status"].to_s == "0"