mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-03-10 20:41:44 +00:00
Refactor import statements and fix formatting issues
This commit is contained in:
@ -5,7 +5,10 @@ import { ConfigModule } from '@nestjs/config';
|
||||
import { ProductRepositoryModule } from '@app/common/modules/product/product.repository.module';
|
||||
import { ProductRepository } from '@app/common/modules/product/repositories';
|
||||
import { DeviceRepositoryModule } from '@app/common/modules/device';
|
||||
import { DeviceRepository, DeviceUserTypeRepository } from '@app/common/modules/device/repositories';
|
||||
import {
|
||||
DeviceRepository,
|
||||
DeviceUserTypeRepository,
|
||||
} from '@app/common/modules/device/repositories';
|
||||
import { PermissionTypeRepository } from '@app/common/modules/permission/repositories';
|
||||
import { SpaceRepository } from '@app/common/modules/space/repositories';
|
||||
import { GroupDeviceRepository } from '@app/common/modules/group-device/repositories';
|
||||
@ -19,7 +22,7 @@ import { GroupDeviceRepository } from '@app/common/modules/group-device/reposito
|
||||
PermissionTypeRepository,
|
||||
SpaceRepository,
|
||||
DeviceRepository,
|
||||
GroupDeviceRepository
|
||||
GroupDeviceRepository,
|
||||
],
|
||||
exports: [DeviceService],
|
||||
})
|
||||
|
||||
@ -8,7 +8,7 @@ export interface GetDeviceDetailsInterface {
|
||||
export interface GetDevicesByRoomIdInterface {
|
||||
success: boolean;
|
||||
msg: string;
|
||||
result:any;
|
||||
result: any;
|
||||
}
|
||||
|
||||
export interface GetDevicesByGroupIdInterface {
|
||||
|
||||
@ -87,7 +87,7 @@ export class DeviceService {
|
||||
deviceTuyaUuid: getDeviceByRoomIdDto.roomId,
|
||||
},
|
||||
});
|
||||
const response:any = await this.tuya.request({
|
||||
const response: any = await this.tuya.request({
|
||||
method: 'GET',
|
||||
path,
|
||||
query: {
|
||||
@ -106,14 +106,14 @@ export class DeviceService {
|
||||
(item2) => item1.deviceTuyaUuid === item2.uuid,
|
||||
);
|
||||
if (matchingItem) {
|
||||
matchingRecords.push({...matchingItem });
|
||||
matchingRecords.push({ ...matchingItem });
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
success:true,
|
||||
msg:'Device Tuya Details Fetched successfully',
|
||||
result:matchingRecords
|
||||
success: true,
|
||||
msg: 'Device Tuya Details Fetched successfully',
|
||||
result: matchingRecords,
|
||||
};
|
||||
} catch (error) {
|
||||
throw new HttpException(
|
||||
|
||||
@ -83,5 +83,4 @@ export class UserDevicePermissionController {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user