change pw_cost to integer to match official impl
This commit is contained in:
parent
783873b74d
commit
6729959580
|
@ -2,7 +2,7 @@ CREATE TABLE users (
|
|||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
email VARCHAR NOT NULL,
|
||||
password VARCHAR NOT NULL,
|
||||
pw_cost VARCHAR NOT NULL,
|
||||
pw_cost INTEGER NOT NULL,
|
||||
pw_nonce VARCHAR NOT NULL,
|
||||
version VARCHAR NOT NULL
|
||||
)
|
|
@ -81,7 +81,7 @@ fn _sign_in(db: DbConn, mail: &str, passwd: &str) -> Custom<JsonResp<AuthResult>
|
|||
|
||||
#[derive(Serialize)]
|
||||
struct AuthParams {
|
||||
pw_cost: String,
|
||||
pw_cost: i32,
|
||||
pw_nonce: String,
|
||||
version: String
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ table! {
|
|||
id -> Integer,
|
||||
email -> Text,
|
||||
password -> Text,
|
||||
pw_cost -> Text,
|
||||
pw_cost -> Integer,
|
||||
pw_nonce -> Text,
|
||||
version -> Text,
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ struct UserQuery {
|
|||
pub id: i32,
|
||||
pub email: String,
|
||||
pub password: String,
|
||||
pub pw_cost: String,
|
||||
pub pw_cost: i32,
|
||||
pub pw_nonce: String,
|
||||
pub version: String
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ pub struct User {
|
|||
pub id: i32,
|
||||
pub email: String,
|
||||
pub password: Password,
|
||||
pub pw_cost: String,
|
||||
pub pw_cost: i32,
|
||||
pub pw_nonce: String,
|
||||
pub version: String
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ pub struct User {
|
|||
pub struct NewUser {
|
||||
pub email: String,
|
||||
pub password: String,
|
||||
pub pw_cost: String,
|
||||
pub pw_cost: i32,
|
||||
pub pw_nonce: String,
|
||||
pub version: String
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue