diff --git a/src/controllers/routes.rs b/src/controllers/routes.rs index 5387f17..105ee94 100644 --- a/src/controllers/routes.rs +++ b/src/controllers/routes.rs @@ -84,5 +84,8 @@ pub fn get_routes() -> Vec { Route::post_without_login("/user/getInfoMultiple", Box::new(user_controller::get_multiple)), Route::post_without_login("/user/getInfosMultiple", Box::new(user_controller::get_multiple)), + + 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)), ] } \ No newline at end of file diff --git a/src/controllers/user_controller.rs b/src/controllers/user_controller.rs index 72099f7..9b15be8 100644 --- a/src/controllers/user_controller.rs +++ b/src/controllers/user_controller.rs @@ -34,13 +34,18 @@ pub fn get_multiple(request: &mut HttpRequestHandler) -> RequestResult { let mut map: HashMap = HashMap::new(); for user_id in user_ids { - let user = request.ok_or_not_found( + let user = request.ok_or_not_found( find_user_by_id(user_id), - "At least one user was not found!" + "At least one user was not found!", )?; map.insert(user_id, APIUserInfo::new(request.user_id_opt(), &user)?); } request.set_response(map) +} + +/// Get advanced information about a user +pub fn get_advanced_info(request: &mut HttpRequestHandler) -> RequestResult { + request.success("get user info") } \ No newline at end of file