use crate::data::api_client::APIClient; use crate::data::error::ResultBoxError; use crate::helpers::user_helper; /// Account helper /// /// @author Pierre Hubert /// Attempt to sign-in user /// /// In this version of the api, we consider that there is only one login token required /// This is why I returns just a simple string, the token created for the user in case of success pub fn login_user(email: &str, password: &str, client: &APIClient) -> ResultBoxError { let user = user_helper::find_user_by_email(email)?; // TODO : check user password println!("{:#?}", user); Ok("d".to_string()) }