//! # Search controller //! //! @author Pierre Hubert use crate::controllers::routes::RequestResult; use crate::data::http_request_handler::HttpRequestHandler; use crate::helpers::user_helper; /// Search for user pub fn search_user(r: &mut HttpRequestHandler) -> RequestResult { let query = r.post_string_opt("query", 1, true)?; let limit = r.post_u64_opt("searchLimit", 5)?; let list = user_helper::search_user(&query, limit)?; r.set_response(list) }