mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 05:04:54 +00:00
fixing propagation
This commit is contained in:
@ -1546,4 +1546,21 @@ export class DeviceService {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async moveDevicesToSpace(
|
||||
targetSpace: SpaceEntity,
|
||||
deviceIds: string[],
|
||||
): Promise<void> {
|
||||
if (!deviceIds || deviceIds.length === 0) {
|
||||
throw new HttpException(
|
||||
'No device IDs provided for transfer',
|
||||
HttpStatus.BAD_REQUEST,
|
||||
);
|
||||
}
|
||||
|
||||
await this.deviceRepository.update(
|
||||
{ uuid: In(deviceIds) },
|
||||
{ spaceDevice: targetSpace },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user