mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
added load new space models
This commit is contained in:
@ -50,7 +50,27 @@ class SpaceModelManagementApi {
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
debugPrint('Error creating community: $e');
|
||||
debugPrint('Error creating space model: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Future<SpaceTemplateModel?> getSpaceModel(String spaceModelUuid) async {
|
||||
try {
|
||||
final response = await HTTPService().get(
|
||||
path: ApiEndpoints.getSpaceModel
|
||||
.replaceAll('{projectId}', TempConst.projectId)
|
||||
.replaceAll('{spaceModelUuid}', spaceModelUuid),
|
||||
showServerMessage: true,
|
||||
expectedResponseModel: (json) {
|
||||
debugPrint('Response JSON: $json');
|
||||
|
||||
return SpaceTemplateModel.fromJson(json['data']);
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
debugPrint('Error getting space model: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user