feat: account deletion request and active-user check
This commit is contained in:
@@ -21,7 +21,9 @@ pub async fn execute(deps: &RegisterDeps, cmd: RegisterCommand) -> Result<(), Do
|
||||
));
|
||||
}
|
||||
|
||||
if deps.user.find_by_username(&username).await?.is_some() {
|
||||
if deps.user.find_by_username(&username).await?.is_some()
|
||||
|| deps.user.is_username_retired(&username).await?
|
||||
{
|
||||
return Err(DomainError::ValidationError(
|
||||
"Username already taken".into(),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user