mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-09 22:57:24 +00:00
Compare commits
3 Commits
b9da00aaa6
...
d232c06ebe
Author | SHA1 | Date | |
---|---|---|---|
d232c06ebe | |||
5c916ed445 | |||
8f9b15f49f |
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
|
||||
|
||||
#github
|
||||
/.github
|
||||
/.github/workflows
|
||||
|
||||
# Logs
|
||||
logs
|
||||
|
@ -266,6 +266,7 @@ export class ScheduleService {
|
||||
const schedules = await this.getScheduleDeviceInTuya(
|
||||
deviceDetails.deviceTuyaUuid,
|
||||
category,
|
||||
deviceDetails.productDevice.prodType as ProductType,
|
||||
);
|
||||
const result = schedules.result.map((schedule: any) => {
|
||||
return {
|
||||
@ -295,9 +296,12 @@ export class ScheduleService {
|
||||
async getScheduleDeviceInTuya(
|
||||
deviceId: string,
|
||||
category: string,
|
||||
deviceType: ProductType,
|
||||
): Promise<getDeviceScheduleInterface> {
|
||||
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({
|
||||
method: 'GET',
|
||||
path,
|
||||
|
Reference in New Issue
Block a user