fixed 增加自动登录
This commit is contained in:
parent
26bfc2c0bf
commit
ee3a14fa28
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue