Browse Source

fixed 错误对象

pull/313/head
xxq250 3 years ago
parent
commit
1fc79535ad
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      app/controllers/oauth/base_controller.rb
  2. +2
    -2
      app/libs/educoder_oauth/service.rb

+ 2
- 2
app/controllers/oauth/base_controller.rb View File

@@ -14,11 +14,11 @@ class Oauth::BaseController < ActionController::Base

private
def tip_exception(status = -1, message)
raise Educoder::TipException.new(status, message)
raise Gitlink::TipException.new(status, message)
end

def tip_show_exception(status = -2, message)
raise Educoder::TipException.new(status, message)
raise Gitlink::TipException.new(status, message)
end

def tip_show(exception)


+ 2
- 2
app/libs/educoder_oauth/service.rb View File

@@ -15,7 +15,7 @@ module EducoderOauth::Service

result
rescue Exception => e
raise Educoder::TipException.new(e.message)
raise Gitlink::TipException.new(e.message)
end
end

@@ -27,7 +27,7 @@ module EducoderOauth::Service
result = client.auth_code.get_token(code, redirect_uri: EducoderOauth.redirect_uri).to_hash
return result
rescue Exception => e
raise Educoder::TipException.new(e.message)
raise Gitlink::TipException.new(e.message)
end
end



Loading…
Cancel
Save