mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 21:39:21 +00:00
Ready to implement route virtualDirectory/find
This commit is contained in:
parent
a934d2bf82
commit
d30b1ea776
@ -91,5 +91,7 @@ pub fn get_routes() -> Vec<Route> {
|
||||
|
||||
// Virtual directory controller
|
||||
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),
|
||||
|
||||
Route::post("/virtualDirectory/find", Box::new(virtual_directory_controller::find)),
|
||||
]
|
||||
}
|
@ -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")
|
||||
}
|
Loading…
Reference in New Issue
Block a user