//! # Settings controller //! //! @author Pierre Hubert use crate::api_data::general_settings_api::GeneralSettingsAPI; use crate::controllers::routes::RequestResult; use crate::data::http_request_handler::HttpRequestHandler; use crate::helpers::user_helper; /// Get the general settings of the user pub fn get_general(r: &mut HttpRequestHandler) -> RequestResult { let user = user_helper::find_user_by_id(r.user_id_ref()?)?; r.set_response(GeneralSettingsAPI::new(&user)) }