dont use username in key

This commit is contained in:
Bevan Hunt 2020-01-06 16:35:38 -08:00
parent 8b01f131e6
commit b5c3e0a67c
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@ -386,7 +386,7 @@ dependencies = [
[[package]]
name = "broker"
version = "0.5.0"
version = "0.5.1"
dependencies = [
"actix-cors 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package]
name = "broker"
version = "0.5.0"
version = "0.5.1"
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
edition = "2018"
license = "MIT"

View File

@ -300,7 +300,7 @@ async fn user_create(data: web::Data<MyData>, json: web::Json<UserForm>) -> Resu
} else {
// set as future value
let uuid = Uuid::new_v4();
let versioned = format!("{}_u_{}", json.username, uuid.to_string());
let versioned = format!("user_u_{}", uuid.to_string());
let hashed = hash(json.clone().password, DEFAULT_COST).unwrap();
let new_user = User{id: uuid, username: json.clone().username, password: hashed, info: json.clone().info};