mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-12-02 01:53:16 +00:00
add err for RegisterByOauth
This commit is contained in:
@@ -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