mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-01-30 14:03:00 +00:00
Ready to implement new method
This commit is contained in:
parent
e82f2f7c59
commit
c402405d9b
@ -4,6 +4,7 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::api_data::advanced_group_api::AdvancedGroupApi;
|
||||
use crate::api_data::group_api::GroupApi;
|
||||
use crate::api_data::res_create_group::GroupCreationResult;
|
||||
use crate::controllers::routes::RequestResult;
|
||||
@ -12,7 +13,6 @@ use crate::data::group_id::GroupID;
|
||||
use crate::data::http_request_handler::HttpRequestHandler;
|
||||
use crate::data::new_group::NewGroup;
|
||||
use crate::helpers::groups_helper;
|
||||
use crate::api_data::advanced_group_api::AdvancedGroupApi;
|
||||
|
||||
/// Create a new group
|
||||
pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
@ -72,4 +72,9 @@ pub fn get_advanced_info(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
let group = groups_helper::get_info(&group_id)?;
|
||||
|
||||
r.set_response(AdvancedGroupApi::new(&group, r.user_id_opt())?)
|
||||
}
|
||||
|
||||
/// Get the settings of the group
|
||||
pub fn get_settings(r: &mut HttpRequestHandler) -> RequestResult {
|
||||
r.success("implement me")
|
||||
}
|
@ -138,6 +138,8 @@ pub fn get_routes() -> Vec<Route> {
|
||||
|
||||
Route::post("/groups/get_advanced_info", Box::new(groups_controller::get_advanced_info)),
|
||||
|
||||
Route::post("/groups/get_settings", Box::new(groups_controller::get_settings)),
|
||||
|
||||
|
||||
// Virtual directory controller
|
||||
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),
|
||||
|
Loading…
x
Reference in New Issue
Block a user