mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-07-17 15:18:05 +00:00
Can delete a member of a group
This commit is contained in:
src
@ -405,6 +405,21 @@ export class GroupsHelper {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the number of members of a group at a specific member
|
||||
* @param groupID Target group ID
|
||||
* @param level The level to check
|
||||
*/
|
||||
public static async CountMembersAtLevel(groupID: number, level: GroupMembershipLevels) : Promise<number> {
|
||||
return await DatabaseHelper.Count({
|
||||
table: GROUPS_MEMBERS_TABLE,
|
||||
where: {
|
||||
groups_id: groupID,
|
||||
level: level
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Turn a database row into a {GroupInfo} object
|
||||
*
|
||||
|
Reference in New Issue
Block a user