mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Refactor device management and space management APIs, update event and state classes, and add RemoveDeviceWidget for device removal functionality.
This commit is contained in:
@ -370,7 +370,8 @@ class DevicesManagementApi {
|
||||
});
|
||||
return response;
|
||||
}
|
||||
static Future resetDevise({
|
||||
|
||||
static Future resetDevice({
|
||||
String? devicesUuid,
|
||||
}) async {
|
||||
final response = await HTTPService().post(
|
||||
@ -385,7 +386,4 @@ class DevicesManagementApi {
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -373,7 +373,6 @@ class CommunitySpaceManagementApi {
|
||||
required String spaceId,
|
||||
required String projectId}) async {
|
||||
try {
|
||||
// Construct the API path
|
||||
final path = ApiEndpoints.listSubspace
|
||||
.replaceFirst('{communityUuid}', communityId)
|
||||
.replaceFirst('{spaceUuid}', spaceId)
|
||||
@ -389,9 +388,6 @@ class CommunitySpaceManagementApi {
|
||||
for (var subspace in json['data']) {
|
||||
rooms.add(SubSpaceModel.fromJson(subspace));
|
||||
}
|
||||
} else {
|
||||
debugPrint(
|
||||
"Warning: 'data' key is missing or null in response JSON.");
|
||||
}
|
||||
return rooms;
|
||||
},
|
||||
@ -399,7 +395,7 @@ class CommunitySpaceManagementApi {
|
||||
|
||||
return response;
|
||||
} catch (error, stackTrace) {
|
||||
return []; // Return an empty list if there's an error
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user