mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
updated api
This commit is contained in:
@ -20,7 +20,7 @@ class CommunitySpaceManagementApi {
|
||||
return CommunityModel.fromJson(jsonItem);
|
||||
}).toList();
|
||||
return communityList;
|
||||
},
|
||||
},
|
||||
);
|
||||
return response;
|
||||
} catch (e) {
|
||||
@ -141,12 +141,19 @@ class CommunitySpaceManagementApi {
|
||||
}
|
||||
}
|
||||
|
||||
Future<SpaceModel?> createSpace(String communityId, String name,
|
||||
{String? parentId, bool isPrivate = false}) async {
|
||||
Future<SpaceModel?> createSpace({
|
||||
required String communityId,
|
||||
required String name,
|
||||
String? parentId,
|
||||
bool isPrivate = false,
|
||||
required Offset position,
|
||||
}) async {
|
||||
try {
|
||||
final body = {
|
||||
'name': name,
|
||||
'isPrivate': isPrivate,
|
||||
'x': position.dx,
|
||||
'y': position.dy,
|
||||
};
|
||||
if (parentId != null) {
|
||||
body['parentId'] = parentId;
|
||||
@ -219,5 +226,4 @@ class CommunitySpaceManagementApi {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user