mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-02-17 14:04:51 +08:00
fix: Get Uuids
This commit is contained in:
@@ -126,7 +126,14 @@ func (ps *PeerService) GetUuidListByIDs(ids []uint) ([]string, error) {
|
|||||||
err := DB.Model(&model.Peer{}).
|
err := DB.Model(&model.Peer{}).
|
||||||
Where("row_id in (?)", ids).
|
Where("row_id in (?)", ids).
|
||||||
Pluck("uuid", &uuids).Error
|
Pluck("uuid", &uuids).Error
|
||||||
return uuids, err
|
//过滤uuids中的空字符串
|
||||||
|
var newUuids []string
|
||||||
|
for _, uuid := range uuids {
|
||||||
|
if uuid != "" {
|
||||||
|
newUuids = append(newUuids, uuid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newUuids, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchDelete 批量删除, 同时也应该删除token
|
// BatchDelete 批量删除, 同时也应该删除token
|
||||||
|
|||||||
Reference in New Issue
Block a user