add err for RegisterByOauth
This commit is contained in:
1 parent
3cd90c8f74
commit
da7b70c471
2 files changed
+9
-8
No files matched your search
@@ -208,9 +208,9 @@ func (o *Oauth) OauthCallback(c *gin.Context) {
|
||||
}
|
||||
|
||||
//自动注册
|
||||
user = service.AllService.UserService.RegisterByOauth(oauthUser, op)
|
||||
if user.Id == 0 {
|
||||
c.String(http.StatusInternalServerError, response.TranslateMsg(c, "OauthRegisterFailed"))
|
||||
err, user = service.AllService.UserService.RegisterByOauth(oauthUser, op)
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, response.TranslateMsg(c, err.Error()))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user