issues25489
p31729568 5 years ago
parent 636d279656
commit e2e9a389f6

@ -87,7 +87,6 @@ class Admins::MirrorRepositoriesController < Admins::BaseController
end
def check_shixun_mirrors!
return
return unless request.format.html?
Admins::CheckShixunMirrorsService.call

@ -1,9 +1,14 @@
class Oauth::BaseController < ActionController::Base
include RenderHelper
include LoginHelper
include ControllerRescueHandler
skip_before_action :verify_authenticity_token
def auth_failure
render_error(params[:message])
end
private
def session_user_id

@ -78,7 +78,7 @@ class Admins::CheckShixunMirrorsService < ApplicationService
url = EduSetting.get('cloud_bridge')
res = Faraday.get(url)
raise Error, '拉取镜像信息异常' if res && res['code'].nonzero?
raise Error, '拉取镜像信息异常' if res && res['code'].to_i != 0
res
rescue => e

@ -1,4 +1,7 @@
OmniAuth.config.add_camelization 'qq', 'QQ'
OmniAuth.config.on_failure = Proc.new { |env|
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
}
oauth_config = {}
begin

@ -7,6 +7,7 @@ Rails.application.routes.draw do
get 'attachments/download/:id', to: 'attachments#show'
get 'attachments/download/:id/:filename', to: 'attachments#show'
get 'auth/qq/callback', to: 'oauth/qq#create'
get 'auth/failure', to: 'oauth/base#auth_failure'
resources :edu_settings
scope '/api' do

Loading…
Cancel
Save