mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Can delete group
This commit is contained in:
@ -238,11 +238,22 @@ class GroupsHelper {
|
||||
.execWithFilesAndThrow();
|
||||
|
||||
/// Delete group logo
|
||||
///
|
||||
/// Throws in case of error
|
||||
static Future<void> deleteLogo(int groupID) async =>
|
||||
await APIRequest(uri: "groups/delete_logo", needLogin: true)
|
||||
.addInt("id", groupID)
|
||||
.execWithThrow();
|
||||
|
||||
/// Delete a group
|
||||
///
|
||||
/// Throws in case of error
|
||||
static Future<void> deleteGroup(int groupID, String password) async =>
|
||||
await APIRequest(uri: "groups/delete", needLogin: true)
|
||||
.addInt("groupID", groupID)
|
||||
.addString("password", password)
|
||||
.execWithThrow();
|
||||
|
||||
/// Turn an API entry into a group object
|
||||
Group _getGroupFromAPI(Map<String, dynamic> map) {
|
||||
return Group(
|
||||
|
Reference in New Issue
Block a user