mirror of https://github.com/apibillme/broker
dont use username in key
This commit is contained in:
parent
8b01f131e6
commit
b5c3e0a67c
|
@ -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)",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
Loading…
Reference in New Issue