From c28196f80ee37b8ea511ba74cff0be3bf83525d7 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 27 Jun 2020 18:06:13 +0200 Subject: [PATCH] Ready to implement new route --- src/controllers/groups_controller.rs | 5 +++++ src/controllers/routes.rs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/controllers/groups_controller.rs b/src/controllers/groups_controller.rs index 9df8bfc..c928e72 100644 --- a/src/controllers/groups_controller.rs +++ b/src/controllers/groups_controller.rs @@ -241,4 +241,9 @@ pub fn cancel_request(r: &mut HttpRequestHandler) -> RequestResult { // TODO : delete any related notification r.success("The request has been successfully cancelled!") +} + +/// Remove a member from a group (as a moderator or an admin) +pub fn delete_member(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 fb24736..c53bb56 100644 --- a/src/controllers/routes.rs +++ b/src/controllers/routes.rs @@ -158,6 +158,8 @@ pub fn get_routes() -> Vec { Route::post("/groups/cancel_request", Box::new(groups_controller::cancel_request)), + Route::post("/groups/delete_member", Box::new(groups_controller::delete_member)), + // Virtual directory controller Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),