Fixed issues

This commit is contained in:
Abdullah Alassaf
2025-02-04 01:54:18 +03:00
parent 506531e16a
commit 572520eed5
5 changed files with 18 additions and 8 deletions

View File

@ -23,7 +23,8 @@ class DevicesManagementApi {
: ApiEndpoints.getAllDevices,
showServerMessage: true,
expectedResponseModel: (json) {
List<dynamic> jsonData = json;
List<dynamic> jsonData =
communityId.isNotEmpty && spaceId.isNotEmpty ? json['data'] : json;
List<AllDevicesModel> devicesList = jsonData.map((jsonItem) {
return AllDevicesModel.fromJson(jsonItem);
}).toList();