mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-03-03 20:34:56 +00:00
set user_id=0 at peers, when the user is deleted
This commit is contained in:
@@ -58,6 +58,11 @@ func (ps *PeerService) UuidUnbindUserId(uuid string, userId uint) {
|
||||
}
|
||||
}
|
||||
|
||||
// EraseUserId 清除用户id, 用于用户删除
|
||||
func (ps *PeerService) EraseUserId(userId uint) error {
|
||||
return global.DB.Model(&model.Peer{}).Where("user_id = ?", userId).Update("user_id", 0).Error
|
||||
}
|
||||
|
||||
// ListByUserIds 根据用户id取列表
|
||||
func (ps *PeerService) ListByUserIds(userIds []uint, page, pageSize uint) (res *model.PeerList) {
|
||||
res = &model.PeerList{}
|
||||
|
||||
Reference in New Issue
Block a user