mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-15 09:45:25 +00:00
community title will list from the api
This commit is contained in:
@ -38,30 +38,3 @@ class SpacesResponse {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CommunitySpaceManagementApi {
|
||||
Future<SpacesResponse> fetchSpaces(String communityId) async {
|
||||
try {
|
||||
final response = await HTTPService().get(
|
||||
path: ApiEndpoints.listSpaces.replaceAll('{communityId}', communityId),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
return SpacesResponse.fromJson(json);
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
debugPrint('Error fetching spaces: $e');
|
||||
return SpacesResponse(
|
||||
data: [],
|
||||
message: 'Error fetching spaces',
|
||||
page: 1,
|
||||
size: 10,
|
||||
totalItem: 0,
|
||||
totalPage: 0,
|
||||
hasNext: false,
|
||||
hasPrevious: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user