fix: cannot delete user

This commit is contained in:
Tao Chen
2024-11-06 14:36:12 +08:00
parent 197a718f03
commit 956700c27f

View File

@@ -215,12 +215,11 @@ func (us *UserService) Delete(u *model.User) error {
tx.Rollback()
return err
}
tx.Commit()
// 删除关联的peer
if err := AllService.PeerService.EraseUserId(u.Id); err != nil {
tx.Rollback()
return err
}
tx.Commit()
return nil
}