more renaming

This commit is contained in:
ntr
2019-05-25 15:52:37 +10:00
parent 6a20e72a64
commit 7e2a95204e
13 changed files with 23 additions and 59 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
use uuid::Uuid;
use bconstructt::{hash, verify};
use bcrypt::{hash, verify};
use rand::{thread_rng, Rng};
use rand::distributions::Alphanumeric;
use std::iter;
@@ -15,7 +15,7 @@ use instance::{Instance, instance_delete};
use failure::Error;
use failure::err_msg;
static PASSWORD_MIN_LEN: usize = 12;
static PASSWORD_MIN_LEN: usize = 11;
#[derive(Debug,Clone,Serialize,Deserialize)]
pub struct Account {
@@ -61,6 +61,7 @@ pub fn account_from_token(token: String, tx: &mut Transaction) -> Result<Account
pub fn account_create(params: AccountCreateParams, tx: &mut Transaction) -> Result<Account, Error> {
let id = Uuid::new_v4();
info!("{:?} {:?}", params.password, params.password.len());
if params.password.len() < PASSWORD_MIN_LEN {
return Err(err_msg("password must be at least 12 characters"));
}
+1 -1
View File
@@ -1,7 +1,7 @@
extern crate rand;
extern crate uuid;
extern crate tungstenite;
extern crate bconstructt;
extern crate bcrypt;
extern crate chrono;
extern crate dotenv;