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
+1 -1
View File
@@ -1 +1 @@
DATABASE_URL=postgres://constructs:craftbeer@localhost/constructs
DATABASE_URL=postgres://mnml:craftbeer@localhost/mnml
+2 -2
View File
@@ -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"] }
+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;