Removed all warnings
This commit is contained in:
parent
a15c4d807f
commit
6cca212c42
@ -6,18 +6,14 @@ use crate::domain::token::Token;
|
||||
use crate::domain::user::User;
|
||||
use crate::dto::token::{AuthenticateUserDto, RefreshAuthTokenForUserDto};
|
||||
use crate::dto::users::{UserLoginPayload, UserRegisterPayload, UserResetPasswordPayload};
|
||||
use crate::resources::error_messages::{
|
||||
ErrorResource, ERROR_CREDENTIAL_DOES_NOT_EXIST, ERROR_EXPIRED_TOKEN, ERROR_INCORRECT_TOKEN,
|
||||
ERROR_PASSWORD_INCORRECT, ERROR_TOKEN_NOT_CREATED, ERROR_TOO_MANY_CREDENTIALS,
|
||||
ERROR_USER_ALREADY_EXISTS, ERROR_USER_DOES_NOT_EXIST,
|
||||
};
|
||||
|
||||
use crate::resources::expirations::AUTH_TOKEN_EXPIRATION_TIME_MILLIS;
|
||||
use crate::utils::hasher::{
|
||||
generate_multiple_random_token_with_rng, hash_password, hash_password_with_existing_salt,
|
||||
};
|
||||
use crate::validation::user_validator::validate_user_for_creation;
|
||||
use chrono::Utc;
|
||||
use log::{debug, error};
|
||||
use log::{error};
|
||||
use sqlx::{PgConnection, Postgres, Transaction};
|
||||
use crate::domain::error::{Error, ValidationError};
|
||||
use crate::domain::error::Error::{AlreadyExistsError, IncorrectCredentialError, NotFoundError, TooManyCredentialsError, UnexpectedError};
|
||||
|
@ -53,6 +53,7 @@ pub(crate) fn validate_user_for_creation(
|
||||
error_resources.push(ValidationError { what: String::from("Password"), reason: ERROR_INVALID_PASSWORD.0.to_string() });
|
||||
}
|
||||
}
|
||||
#[allow(unused)]
|
||||
pub(crate) fn validate_user_for_password_authentication(
|
||||
user: &UserLoginPayload,
|
||||
error_resources: &mut Vec<ValidationError>,
|
||||
|
Loading…
Reference in New Issue
Block a user