1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Can remove membership

This commit is contained in:
2020-04-15 13:25:55 +02:00
parent 4bedbc4b25
commit d0bafd5bd9
2 changed files with 29 additions and 2 deletions

View File

@ -100,6 +100,13 @@ class GroupsHelper {
.map((f) => cast<int>(f))
.toSet();
/// Remove group membership
Future<bool> removeMembership(int groupID) async =>
(await (APIRequest(uri: "groups/remove_membership", needLogin: true)
..addInt("id", groupID))
.exec())
.isOK;
/// Turn an API entry into a group object
Group _getGroupFromAPI(Map<String, dynamic> map) {
return Group(