1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-27 22:18:51 +00:00

Ready to implement new method

This commit is contained in:
Pierre HUBERT 2020-06-01 17:17:18 +02:00
parent faa31f599a
commit e52e86fc43
3 changed files with 18 additions and 2 deletions

View File

@ -3,4 +3,5 @@ pub mod server;
pub mod server_controller;
pub mod account_controller;
pub mod user_controller;
pub mod user_controller;
pub mod virtual_directory_controller;

View File

@ -1,7 +1,7 @@
use std::error::Error;
use crate::controllers::routes::Method::{GET, POST};
use crate::controllers::{server_controller, account_controller, user_controller};
use crate::controllers::{server_controller, account_controller, user_controller, virtual_directory_controller};
use crate::data::http_request_handler::HttpRequestHandler;
/// Project routes
@ -87,5 +87,9 @@ pub fn get_routes() -> Vec<Route> {
Route::post_without_login("/user/getAdvancedUserInfo", Box::new(user_controller::get_advanced_info)),
Route::post_without_login("/user/getAdvancedUserInfos", Box::new(user_controller::get_advanced_info)),
// Virtual directory controller
Route::post("/user/findbyfolder", Box::new(virtual_directory_controller::find_user)),
]
}

View File

@ -0,0 +1,11 @@
//! # Virtual directory controller
//!
//! @author Pierre Hubert
use crate::data::http_request_handler::HttpRequestHandler;
use crate::controllers::routes::RequestResult;
/// Find a user by its virtual directory
pub fn find_user(r: &mut HttpRequestHandler) -> RequestResult {
r.success("implement it")
}