fix: 第三方登录的bug

This commit is contained in:
wenbo.dong 2017-09-27 14:15:49 +08:00
parent eb8bead6a6
commit 8fb625b523

View File

@ -144,6 +144,7 @@ class userController extends baseController {
type: 'third'
};
user = await userInst.save(data);
await this.handlePrivateGroup(user._id);
yapi.commons.sendMail({
to: email,
contents: `<h3>亲爱的用户:</h3><p>您好感谢使用YApi平台你的邮箱账号是${email}</p>`
@ -151,7 +152,6 @@ class userController extends baseController {
}
this.setLoginCookie(user._id, user.passsalt);
await handlePrivateGroup(user._id);
return true;
} catch (e) {
console.error('third_login:', e.message); // eslint-disable-line