Skip to content

Commit

Permalink
Remove Deprecation oauth2_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Apr 15, 2018
1 parent 105ad23 commit 04da24b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/wechat/corp_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require 'wechat/http_client'
require 'wechat/token/corp_access_token'
require 'wechat/ticket/corp_jsapi_ticket'
require 'cgi'

module Wechat
class CorpApi < ApiBase
Expand Down Expand Up @@ -33,13 +32,6 @@ def getuserinfo(code)
get 'user/getuserinfo', params: { code: code }
end

def oauth2_url(redirect_uri, appid)
ActiveSupport::Deprecation.warn('oauth2_url is deprecated. use wechat_oauth2 instead.')

redirect_uri = CGI.escape(redirect_uri)
"https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{appid}&redirect_uri=#{redirect_uri}&response_type=code&scope=snsapi_base#wechat_redirect"
end

def convert_to_openid(userid)
post 'user/convert_to_openid', JSON.generate(userid: userid, agentid: agentid)
end
Expand Down

0 comments on commit 04da24b

Please sign in to comment.