Merge branch 'dev' into link_space_model_spaces

This commit is contained in:
mohammad
2025-03-06 11:50:21 +03:00
82 changed files with 2484 additions and 813 deletions

View File

@ -86,12 +86,23 @@ class SpaceModelManagementApi {
Future validateSpaceModel(String projectId, List<String> spaceUuids) async {
final response = await HTTPService().post(
path:
ApiEndpoints.validateSpaceModel.replaceAll('{projectId}', projectId),
path: ApiEndpoints.validateSpaceModel
.replaceAll('{projectId}', projectId),
showServerMessage: true,
body: {"spacesUuids": spaceUuids},
expectedResponseModel: (json) {
return json;
});
}
Future<bool> deleteSpaceModel(String spaceModelUuid, String projectId) async {
final response = await HTTPService().delete(
path: ApiEndpoints.getSpaceModel
.replaceAll('{projectId}', projectId)
.replaceAll('{spaceModelUuid}', spaceModelUuid),
showServerMessage: true,
body: {"spacesUuids": spaceUuids},
expectedResponseModel: (json) {
return json;
return json['success'] ?? false;
},
);
return response;

View File

@ -14,7 +14,7 @@ class UserPermissionApi {
Future<List<RolesUserModel>> fetchUsers(String projectId) async {
try {
final response = await _httpService.get(
path: ApiEndpoints.getUsers.replaceAll('{projectUuid}', projectId),
path: ApiEndpoints.getUsers.replaceAll('{projectId}', projectId),
showServerMessage: true,
expectedResponseModel: (json) {
debugPrint('fetchUsers Response: $json');