diff --git a/src/controllers/routes.rs b/src/controllers/routes.rs index 7af6979..dea9e10 100644 --- a/src/controllers/routes.rs +++ b/src/controllers/routes.rs @@ -91,5 +91,7 @@ pub fn get_routes() -> Vec { // Virtual directory controller Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)), + + Route::post("/virtualDirectory/find", Box::new(virtual_directory_controller::find)), ] } \ No newline at end of file diff --git a/src/controllers/virtual_directory_controller.rs b/src/controllers/virtual_directory_controller.rs index d5dad69..f767467 100644 --- a/src/controllers/virtual_directory_controller.rs +++ b/src/controllers/virtual_directory_controller.rs @@ -13,8 +13,13 @@ pub fn find_user(r: &mut HttpRequestHandler) -> RequestResult { let user = r.ok_or_not_found( user_helper::find_user_by_virtual_directory(&directory), - "No user was found with this subfolder!" + "No user was found with this subfolder!", )?; r.set_response(FindUserByVirtualDirectoryAPIResult::new(user.id)) +} + +/// Search for user / group with a given virtual directory +pub fn find(r: &mut HttpRequestHandler) -> RequestResult { + r.success("implement me") } \ No newline at end of file