mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Return group information to API
This commit is contained in:
@ -8,6 +8,7 @@ use crate::data::group::GroupAccessLevel;
|
||||
use crate::data::http_request_handler::HttpRequestHandler;
|
||||
use crate::data::new_group::NewGroup;
|
||||
use crate::helpers::groups_helper;
|
||||
use crate::api_data::group_api::GroupApi;
|
||||
|
||||
/// Create a new group
|
||||
pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
@ -36,7 +37,5 @@ pub fn get_info_single(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
let group_id = r.post_group_id_with_access("id", GroupAccessLevel::LIMITED_ACCESS)?;
|
||||
let group = groups_helper::get_info(&group_id)?;
|
||||
|
||||
println!("Group info: {:#?}", group);
|
||||
|
||||
r.success("continue implementation")
|
||||
r.set_response(GroupApi::new(&group, r.user_id_opt())?)
|
||||
}
|
Reference in New Issue
Block a user