mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-09 22:57:24 +00:00
fix deployed issue
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { TuyaContext } from '@tuya/tuya-connector-nodejs';
|
||||
import {
|
||||
AddScheduleDto,
|
||||
@ -13,7 +11,6 @@ import {
|
||||
getDeviceScheduleInterface,
|
||||
} from '../interfaces/get.schedule.interface';
|
||||
|
||||
import { ProductType } from '@app/common/constants/product-type.enum';
|
||||
import { ProductType } from '@app/common/constants/product-type.enum';
|
||||
import { convertKeysToCamelCase } from '@app/common/helper/camelCaseConverter';
|
||||
import { convertTimestampToDubaiTime } from '@app/common/helper/convertTimestampToDubaiTime';
|
||||
@ -22,7 +19,6 @@ import {
|
||||
getScheduleStatus,
|
||||
} from '@app/common/helper/getScheduleStatus';
|
||||
import { DeviceRepository } from '@app/common/modules/device/repositories';
|
||||
import { DeviceRepository } from '@app/common/modules/device/repositories';
|
||||
|
||||
@Injectable()
|
||||
export class ScheduleService {
|
||||
@ -128,7 +124,6 @@ export class ScheduleService {
|
||||
deviceDetails.deviceTuyaUuid,
|
||||
addScheduleDto,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
);
|
||||
} catch (error) {
|
||||
throw new HttpException(
|
||||
@ -152,14 +147,9 @@ export class ScheduleService {
|
||||
deviceDetails.deviceTuyaUuid,
|
||||
category,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
);
|
||||
const result = schedules.result.map((schedule: any) => {
|
||||
return {
|
||||
category:
|
||||
deviceDetails.productDevice.prodType == ProductType.CUR_2
|
||||
? schedule.category
|
||||
: schedule.category.replace('category_', ''),
|
||||
category:
|
||||
deviceDetails.productDevice.prodType == ProductType.CUR_2
|
||||
? schedule.category
|
||||
@ -223,7 +213,6 @@ export class ScheduleService {
|
||||
deviceDetails.deviceTuyaUuid,
|
||||
updateScheduleDto,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
);
|
||||
} catch (error) {
|
||||
throw new HttpException(
|
||||
@ -313,7 +302,6 @@ export class ScheduleService {
|
||||
deviceId: string,
|
||||
updateScheduleDto: UpdateScheduleDto,
|
||||
deviceType: ProductType,
|
||||
deviceType: ProductType,
|
||||
): Promise<addScheduleDeviceInterface> {
|
||||
try {
|
||||
const convertedTime = convertTimestampToDubaiTime(updateScheduleDto.time);
|
||||
|
Reference in New Issue
Block a user