This commit is contained in:
eson
2023-09-06 12:29:34 +08:00
parent 6bbaac287b
commit 67230a58bf
3 changed files with 36 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ func (u *FsUserModel) RegisterByGoogleOAuth(ctx context.Context, token *auth.Reg
// 如果已经存在,把谷歌id 加入到用户信息里
user.GoogleId = &googleId
return tx.Model(&FsUser{}).Update("google_id", user).Error
return tx.Model(&FsUser{}).Where("id = ?", user.Id).Update("google_id", user).Error
})
if err != nil {