mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-23 08:27:54 +00:00
Add utility function to associate space UUID with devices in community and device services
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { DeviceEntity } from '../modules/device/entities';
|
||||
|
||||
export function addSpaceUuidToDevices(
|
||||
devices: DeviceEntity[],
|
||||
spaceUuid: string,
|
||||
): DeviceEntity[] {
|
||||
return devices.map((device) => {
|
||||
(device as any).spaceUuid = spaceUuid;
|
||||
return device;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user