fixing propagation

This commit is contained in:
hannathkadher
2025-03-07 23:01:38 +04:00
parent 226781e53f
commit 1220ee395d
12 changed files with 236 additions and 68 deletions

View File

@ -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 },
);
}
}