1
0
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:
Pierre HUBERT 2020-06-25 13:45:21 +02:00
parent e82f2f7c59
commit c402405d9b
2 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,7 @@
use std::collections::HashMap; use std::collections::HashMap;
use crate::api_data::advanced_group_api::AdvancedGroupApi;
use crate::api_data::group_api::GroupApi; use crate::api_data::group_api::GroupApi;
use crate::api_data::res_create_group::GroupCreationResult; use crate::api_data::res_create_group::GroupCreationResult;
use crate::controllers::routes::RequestResult; 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::http_request_handler::HttpRequestHandler;
use crate::data::new_group::NewGroup; use crate::data::new_group::NewGroup;
use crate::helpers::groups_helper; use crate::helpers::groups_helper;
use crate::api_data::advanced_group_api::AdvancedGroupApi;
/// Create a new group /// Create a new group
pub fn create(r: &mut HttpRequestHandler) -> RequestResult { 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)?; let group = groups_helper::get_info(&group_id)?;
r.set_response(AdvancedGroupApi::new(&group, r.user_id_opt())?) 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")
} }

View File

@ -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_advanced_info", Box::new(groups_controller::get_advanced_info)),
Route::post("/groups/get_settings", Box::new(groups_controller::get_settings)),
// Virtual directory controller // Virtual directory controller
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)), Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),