Skip to content

Commit

Permalink
fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhutu committed May 7, 2016
1 parent 317fe06 commit 859388f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.1.6 / 2016-05-07
==================

* 修复第三方登录bug, fix #5

1.1.5 / 2016-04-30
==================

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jackblog-api-koa",
"version": "1.1.5",
"version": "1.1.6",
"description": "jackblog API koa版",
"main": "server/app.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion server/auth/github/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports.setup = function (User,config) {
status:1
}
const checkUserName = yield User.findOne({nickname:newUser.nickname});
if(checkUser){
if(checkUserName){
newUser.nickname = tools.randomString();
}
const user = yield new User(newUser).save();
Expand Down
2 changes: 1 addition & 1 deletion server/auth/qq/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports.setup = function (User,config) {
status:1
}
const checkUserName = yield User.findOne({nickname:newUser.nickname});
if(checkUser){
if(checkUserName){
newUser.nickname = tools.randomString();
}
const user = yield new User(newUser).save();
Expand Down
2 changes: 1 addition & 1 deletion server/auth/weibo/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.setup = function (User,config) {
status:1
}
const checkUserName = yield User.findOne({nickname:newUser.nickname});
if(checkUser){
if(checkUserName){
newUser.nickname = tools.randomString();
}
const user = yield new User(newUser).save();
Expand Down

0 comments on commit 859388f

Please sign in to comment.