style: rustfmt

This commit is contained in:
2026-07-11 21:59:47 +02:00
parent 2b702d88e4
commit bfaea4a4b0
3 changed files with 8 additions and 14 deletions

View File

@@ -17,14 +17,10 @@ pub struct LoginResult {
pub async fn execute(deps: &LoginDeps, cmd: LoginCommand) -> Result<LoginResult, DomainError> {
let email = Email::new(&cmd.email)?;
let user = deps
.user_repo
.find_by_email(&email)
.await?
.ok_or_else(|| {
tracing::warn!(email = cmd.email, "login attempt with unknown email");
DomainError::Unauthorized("invalid credentials".into())
})?;
let user = deps.user_repo.find_by_email(&email).await?.ok_or_else(|| {
tracing::warn!(email = cmd.email, "login attempt with unknown email");
DomainError::Unauthorized("invalid credentials".into())
})?;
let valid = deps
.password_hasher

View File

@@ -8,9 +8,7 @@ use super::deps::RegisterDeps;
pub async fn execute(deps: &RegisterDeps, cmd: RegisterCommand) -> Result<(), DomainError> {
if !deps.allow_registration {
tracing::warn!("registration attempt while disabled");
return Err(DomainError::Unauthorized(
"registration is disabled".into(),
));
return Err(DomainError::Unauthorized("registration is disabled".into()));
}
let password = Password::new(&cmd.password)?;