refactor(auth): refresh reset_password usecase
zhenyi committed
Modified lib/auth/features/reset_password/usecase.rs lib/auth/features/reset_password/usecase.rs +3 −3 View lib/auth/features/reset_password/usecase.rs
@@ -18,7 +18,7 @@
1818use crate::features::AuthService;
1919use crate::features::password_hash;
2020
21use super::types::{ResetPasswordCmd, ResetPasswordResp};
21use super::{ResetPasswordCmd, ResetPasswordResp};
2222
2323fn map_redis(e: RedisError) -> AuthError {
2424 AuthError::Internal(format!("redis: {e}"))
@@ -53,7 +53,7 @@
5353 svc: &AuthService,
5454) -> Result<ResetPasswordResp, AuthError> {
5555 password_hash::validate_password(
56 password_hash::types::ValidatePasswordRequest {
56 password_hash::ValidatePasswordRequest {
5757 password: &cmd.new_password,
5858 },
5959 &svc.config.password_policy,
@@ -100,7 +100,7 @@
100100 }
101101 let user = user.ok_or_else(|| AuthError::NotFound("user not found".into()))?;
102102
103 let new_hash = password_hash::usecase::hash_password(password_hash::types::PasswordInput {
103 let new_hash = password_hash::usecase::hash_password(password_hash::PasswordInput {
104104 password: &cmd.new_password,
105105 })?;
106106