Small simplification; remove already solved TODO
This commit is contained in:
parent
70b117d11d
commit
18b52cd422
|
@ -76,13 +76,13 @@ struct ApiLoginRequest {
|
||||||
impl ApiLoginRequest {
|
impl ApiLoginRequest {
|
||||||
/// Creates a new API login request.
|
/// Creates a new API login request.
|
||||||
fn new(username: &str, password: &str) -> Self {
|
fn new(username: &str, password: &str) -> Self {
|
||||||
|
let user_name = username.to_owned();
|
||||||
let mut hasher = Md5::new();
|
let mut hasher = Md5::new();
|
||||||
hasher.update(password.as_bytes());
|
hasher.update(password.as_bytes());
|
||||||
let password = format!("{:x}", hasher.finalize());
|
let password = format!("{:x}", hasher.finalize());
|
||||||
|
|
||||||
// TODO: Hash the password!
|
|
||||||
let body = ApiLoginRequestBody {
|
let body = ApiLoginRequestBody {
|
||||||
user_name: username.to_owned(),
|
user_name,
|
||||||
password,
|
password,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue