1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-29 08:46:27 +00:00

Inverted first and last name when creating account

This commit is contained in:
Pierre HUBERT 2021-02-18 19:13:19 +01:00
parent 4a2784919b
commit d3c1ee700d

View File

@ -28,8 +28,8 @@ use crate::utils::user_data_utils::user_data_path;
/// Create a new account /// Create a new account
pub fn create(new_account: &NewAccount) -> ResultBoxError { pub fn create(new_account: &NewAccount) -> ResultBoxError {
database::InsertQuery::new(USERS_TABLE) database::InsertQuery::new(USERS_TABLE)
.add_str("nom", &new_account.first_name) .add_str("prenom", &new_account.first_name)
.add_str("prenom", &new_account.last_name) .add_str("nom", &new_account.last_name)
.add_str("date_creation", &mysql_date()) .add_str("date_creation", &mysql_date())
.add_str("mail", &new_account.email) .add_str("mail", &new_account.email)
.add_str("password", &hash_password(&new_account.password)?) .add_str("password", &hash_password(&new_account.password)?)