mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-22 01:15:16 +00:00
Can get the list of members of a group
This commit is contained in:
@ -324,6 +324,13 @@ pub fn delete_logo(g: &GroupID) -> ResultBoxError {
|
||||
set_logo_path(g, None)
|
||||
}
|
||||
|
||||
/// Get the list of memberships of a group
|
||||
pub fn get_list_members(g: &GroupID) -> ResultBoxError<Vec<GroupMember>> {
|
||||
database::QueryInfo::new(GROUPS_MEMBERS_TABLE)
|
||||
.cond_group_id("groups_id", g)
|
||||
.exec(db_to_group_member)
|
||||
}
|
||||
|
||||
/// Turn a database entry into a group struct
|
||||
fn db_to_group(row: &database::RowResult) -> ResultBoxError<Group> {
|
||||
let group_id = row.get_group_id("id")?;
|
||||
|
Reference in New Issue
Block a user