account names

This commit is contained in:
ntr 2019-05-19 20:00:13 +10:00
parent 6091e23631
commit e5ad53c8c2

View File

@ -65,6 +65,10 @@ pub fn account_create(params: AccountCreateParams, tx: &mut Transaction) -> Resu
return Err(err_msg("password must be at least 12 characters")); return Err(err_msg("password must be at least 12 characters"));
} }
if params.name.len() == 0 {
return Err(err_msg("account name not supplied"));
}
let rounds = 8; let rounds = 8;
let password = hash(&params.password, rounds)?; let password = hash(&params.password, rounds)?;