mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
link space model api integration
This commit is contained in:
@ -60,4 +60,40 @@ class SpaceModelManagementApi {
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
Future linkSpaceModel(
|
||||
{required String spaceModelUuid,
|
||||
required String projectId,
|
||||
required List<String> spaceUuids,
|
||||
required bool isOverWrite}) async {
|
||||
print(spaceModelUuid);
|
||||
print(projectId);
|
||||
print(spaceUuids);
|
||||
print(isOverWrite);
|
||||
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.linkSpaceModel
|
||||
.replaceAll('{projectId}', projectId)
|
||||
.replaceAll('{spaceModelUuid}', spaceModelUuid),
|
||||
showServerMessage: true,
|
||||
body: {"spaceUuids": spaceUuids, "overwrite": isOverWrite},
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}
|
||||
|
||||
Future validateSpaceModel(String projectId, List<String> spaceUuids) async {
|
||||
final response = await HTTPService().post(
|
||||
path:
|
||||
ApiEndpoints.validateSpaceModel.replaceAll('{projectId}', projectId),
|
||||
showServerMessage: true,
|
||||
body: {"spacesUuids": spaceUuids},
|
||||
expectedResponseModel: (json) {
|
||||
return json;
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user