mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 21:39:21 +00:00
Implement get group settings method
This commit is contained in:
parent
c402405d9b
commit
fb99586afc
@ -76,5 +76,10 @@ pub fn get_advanced_info(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
|
||||
/// Get the settings of the group
|
||||
pub fn get_settings(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
r.success("implement me")
|
||||
let group_id = r.post_group_id_with_access("id", GroupAccessLevel::ADMIN_ACCESS)?;
|
||||
let group = groups_helper::get_info(&group_id)?;
|
||||
|
||||
// For now, this method is the same as the get advanced info method,
|
||||
// but this might change in the future...
|
||||
r.set_response(AdvancedGroupApi::new(&group, r.user_id_opt())?)
|
||||
}
|
Loading…
Reference in New Issue
Block a user