From c402405d9bbe5b06d68ffcb6958e47d897965e91 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 25 Jun 2020 13:45:21 +0200 Subject: [PATCH] Ready to implement new method --- src/controllers/groups_controller.rs | 7 ++++++- src/controllers/routes.rs | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/groups_controller.rs b/src/controllers/groups_controller.rs index af52608..e866d89 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -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") } \ No newline at end of file diff --git a/src/controllers/routes.rs b/src/controllers/routes.rs index f1e8a0b..2b9c44e 100644 --- a/src/controllers/routes.rs +++ b/src/controllers/routes.rs @@ -138,6 +138,8 @@ pub fn get_routes() -> Vec { 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)),