more renaming
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
DATABASE_URL=postgres://constructs:craftbeer@localhost/constructs
|
||||
DATABASE_URL=postgres://mnml:craftbeer@localhost/mnml
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "constructs"
|
||||
name = "mnml"
|
||||
version = "0.1.0"
|
||||
authors = ["ntr <ntr@smokestack.io>"]
|
||||
|
||||
@@ -13,7 +13,7 @@ serde_cbor = "0.9"
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
|
||||
tungstenite = "0.6"
|
||||
bconstructt = "0.2"
|
||||
bcrypt = "0.2"
|
||||
|
||||
dotenv = "0.9.0"
|
||||
postgres = { version = "0.15", features = ["with-uuid"] }
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user