mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 10:25:23 +00:00
Compare commits
4 Commits
fix/integr
...
main
Author | SHA1 | Date | |
---|---|---|---|
d232c06ebe | |||
5c916ed445 | |||
8f9b15f49f | |||
b9da00aaa6 |
17
.github/pull_request_template.md
vendored
Normal file
17
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!--
|
||||||
|
Thanks for contributing!
|
||||||
|
|
||||||
|
Provide a description of your changes below and a general summary in the title.
|
||||||
|
-->
|
||||||
|
|
||||||
|
## Jira Ticket
|
||||||
|
|
||||||
|
[SP-0000](https://syncrow.atlassian.net/browse/SP-0000)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<!--- Describe your changes in detail -->
|
||||||
|
|
||||||
|
## How to Test
|
||||||
|
|
||||||
|
<!--- Describe the created APIs / Logic -->
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,7 +4,7 @@
|
|||||||
/build
|
/build
|
||||||
|
|
||||||
#github
|
#github
|
||||||
/.github
|
/.github/workflows
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
|
@ -266,6 +266,7 @@ export class ScheduleService {
|
|||||||
const schedules = await this.getScheduleDeviceInTuya(
|
const schedules = await this.getScheduleDeviceInTuya(
|
||||||
deviceDetails.deviceTuyaUuid,
|
deviceDetails.deviceTuyaUuid,
|
||||||
category,
|
category,
|
||||||
|
deviceDetails.productDevice.prodType as ProductType,
|
||||||
);
|
);
|
||||||
const result = schedules.result.map((schedule: any) => {
|
const result = schedules.result.map((schedule: any) => {
|
||||||
return {
|
return {
|
||||||
@ -295,9 +296,12 @@ export class ScheduleService {
|
|||||||
async getScheduleDeviceInTuya(
|
async getScheduleDeviceInTuya(
|
||||||
deviceId: string,
|
deviceId: string,
|
||||||
category: string,
|
category: string,
|
||||||
|
deviceType: ProductType,
|
||||||
): Promise<getDeviceScheduleInterface> {
|
): Promise<getDeviceScheduleInterface> {
|
||||||
try {
|
try {
|
||||||
const path = `/v2.0/cloud/timer/device/${deviceId}?category=category_${category}`;
|
const categoryToSent =
|
||||||
|
deviceType == ProductType.CUR_2 ? category : `category_${category}`;
|
||||||
|
const path = `/v2.0/cloud/timer/device/${deviceId}?category=${categoryToSent}`;
|
||||||
const response = await this.tuya.request({
|
const response = await this.tuya.request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
path,
|
path,
|
||||||
|
Reference in New Issue
Block a user