Small simplification; remove already solved TODO

This commit is contained in:
Paul van Tilburg 2023-01-15 12:26:20 +01:00
parent 70b117d11d
commit 18b52cd422
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
1 changed files with 2 additions and 2 deletions

View File

@ -76,13 +76,13 @@ struct ApiLoginRequest {
impl ApiLoginRequest {
/// Creates a new API login request.
fn new(username: &str, password: &str) -> Self {
let user_name = username.to_owned();
let mut hasher = Md5::new();
hasher.update(password.as_bytes());
let password = format!("{:x}", hasher.finalize());
// TODO: Hash the password!
let body = ApiLoginRequestBody {
user_name: username.to_owned(),
user_name,
password,
};