1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 15:29:21 +00:00

Ready to implement route virtualDirectory/find

This commit is contained in:
Pierre HUBERT 2020-06-02 13:29:10 +02:00
parent a934d2bf82
commit d30b1ea776
2 changed files with 8 additions and 1 deletions

View File

@ -91,5 +91,7 @@ pub fn get_routes() -> Vec<Route> {
// 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)),
Route::post("/virtualDirectory/find", Box::new(virtual_directory_controller::find)),
] ]
} }

View File

@ -13,8 +13,13 @@ pub fn find_user(r: &mut HttpRequestHandler) -> RequestResult {
let user = r.ok_or_not_found( let user = r.ok_or_not_found(
user_helper::find_user_by_virtual_directory(&directory), 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)) 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")
}