fixed issues in space

This commit is contained in:
hannathkadher
2024-10-30 11:04:36 +04:00
parent d025da6daf
commit 489789da0a
4 changed files with 26 additions and 13 deletions
+4 -2
View File
@@ -18,12 +18,13 @@ class SpacesAPI {
final response = await _httpService.get(
path: path,
showServerMessage: false,
expectedResponseModel: (json) => SpaceModel.fromJsonList(json['data']),
expectedResponseModel: (json) {
return SpaceModel.fromJsonList(json['data']);
},
);
return response;
} catch (error) {
print("Error in getSpacesByUserId: $error");
rethrow; // Rethrow the error to be caught by `fetchUnitsByUserId`
}
}
@@ -33,6 +34,7 @@ class SpacesAPI {
final path = ApiEndpoints.listSubspace
.replaceFirst('{communityUuid}', communityId)
.replaceFirst('{spaceUuid}', spaceId);
print("Constructed path: $path");
final response = await _httpService.get(
path: path,