blsm-mp-wx 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/blsm-mp-wx.rb +3 -0
- data/lib/blsm-mp-wx/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2f011245c2e6fd4f6467197f3a524c796e8f80
|
4
|
+
data.tar.gz: 4357f0f930a6f09f26b5f33a9079261216d36244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 930900ba844e99cdf19d2449089c6d44d6bd9d3569c29170656d83b93f092ac53ccd0c1ef03b2b5fda2cbc57520d869077a02a528b3bbbaa388b7ca2eda0af91
|
7
|
+
data.tar.gz: 5699f5cef098b018924e96a01632b272df72429bd0b3325a76bd63f35306ebcf6533c4b402059319f01f984ea49e26985d1209da7281a80064eb44dbd7484a25
|
data/Gemfile.lock
CHANGED
data/lib/blsm-mp-wx.rb
CHANGED
@@ -373,6 +373,7 @@ module BlsmMpWx
|
|
373
373
|
end
|
374
374
|
|
375
375
|
res = parse_json(response_body)
|
376
|
+
return res unless res['access_token']
|
376
377
|
|
377
378
|
|
378
379
|
conn = Faraday.new(:url => 'https://api.weixin.qq.com')
|
@@ -389,6 +390,8 @@ module BlsmMpWx
|
|
389
390
|
end
|
390
391
|
|
391
392
|
res = parse_json(response_body)
|
393
|
+
return res unless res['nickname']
|
394
|
+
|
392
395
|
VdWxUser.find_or_create_by({app_id: app_id, openid: res['openid']}) do |u|
|
393
396
|
u.update_attributes({nickname: res['nickname'],
|
394
397
|
sex: res['sex'],
|
data/lib/blsm-mp-wx/version.rb
CHANGED