传request参数

This commit is contained in:
guange 2016-02-28 22:28:44 +08:00
parent 0ab579af98
commit 35f9dc6e77
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class WechatsController < ActionController::Base
end
on :event, with: 'subscribe' do |request|
sendBind
sendBind(request)
end
# When unsubscribe user scan qrcode qrscene_xxxxxx to subscribe in public account
@ -147,11 +147,11 @@ class WechatsController < ActionController::Base
url: n[:url]
end
else
sendBind
sendBind(request)
end
end
def sendBind
def sendBind(request)
openid = request[:FromUserName]
attrs = wechat.user(openid)
UserWechat.delete_all(openid: openid)