Merge pull request #32 from IamTaoChen/bug/odic-user

delete user from user_thirds and update README
This commit is contained in:
乐 authored and GitHub committed 2024-10-30 19:08:50 +08:00
commit 68065d3372
6 files changed
+27 -7

No files matched your search

+6
View File
@@ -441,6 +441,12 @@ func (os *OauthService) UnBindThird(thirdType string, userid uint) error {
return global.DB.Where("user_id = ? and third_type = ?", userid, thirdType).Delete(&model.UserThird{}).Error
}
// DeleteUserByUserId: When user is deleted, delete all third party bindings
func (os *OauthService) DeleteUserByUserId(userid uint) error {
return global.DB.Where("user_id = ?", userid).Delete(&model.UserThird{}).Error
}
// InfoById 根据id取用户信息
func (os *OauthService) InfoById(id uint) *model.Oauth {
u := &model.Oauth{}