mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-14 09:17:23 +00:00
fixes issues
This commit is contained in:
@ -91,7 +91,6 @@ class DevicesAPI {
|
||||
.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print('json==#$json');
|
||||
return json;
|
||||
},
|
||||
);
|
||||
@ -138,11 +137,12 @@ class DevicesAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future getFourSceneInfo(String deviceId) async {
|
||||
static Future getDeviceSceneInfo(String deviceId) async {
|
||||
final response = await _httpService.get(
|
||||
path: ApiEndpoints.fourScene.replaceAll('{deviceUuid}', deviceId),
|
||||
path: ApiEndpoints.deviceScene.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print(json);
|
||||
return json;
|
||||
});
|
||||
return response;
|
||||
@ -161,14 +161,14 @@ class DevicesAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future postFourSceneInfo({
|
||||
static Future postDeviceSceneInfo({
|
||||
String? switchName,
|
||||
String? sceneUuid,
|
||||
String? deviceId,
|
||||
String? spaceUuid,
|
||||
}) async {
|
||||
final response = await _httpService.post(
|
||||
path: ApiEndpoints.fourScene.replaceAll('{deviceUuid}', deviceId!),
|
||||
path: ApiEndpoints.deviceScene.replaceAll('{deviceUuid}', deviceId!),
|
||||
body: jsonEncode(
|
||||
{
|
||||
"switchName": switchName,
|
||||
@ -178,7 +178,6 @@ class DevicesAPI {
|
||||
),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print('postFourSceneInfo=$json');
|
||||
return json;
|
||||
});
|
||||
return response;
|
||||
@ -189,7 +188,7 @@ class DevicesAPI {
|
||||
path: ApiEndpoints.deviceByUuid.replaceAll('{deviceUuid}', deviceId),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
print('json==$json');
|
||||
print('object-*-*-*${json}');
|
||||
return json;
|
||||
});
|
||||
return response;
|
||||
@ -529,4 +528,20 @@ class DevicesAPI {
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future unAssignScenesDevice({
|
||||
String? deviceUuid,
|
||||
String? switchName,
|
||||
}) async {
|
||||
final response = await _httpService.delete(
|
||||
path: ApiEndpoints.unAssignScenesDevice
|
||||
.replaceAll('{deviceUuid}', deviceUuid!)
|
||||
.replaceAll('{switchName}', switchName!),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user