Can delete a single account

This commit is contained in:
2025-04-07 20:56:42 +02:00
parent 7c10e3ca5c
commit 559eadfd05
2 changed files with 10 additions and 4 deletions

View File

@ -39,3 +39,10 @@ pub async fn get_list(auth: AuthExtractor) -> HttpResult {
pub async fn get_single(account: AccountInPath) -> HttpResult {
Ok(HttpResponse::Ok().json(account.as_ref()))
}
/// Delete an account
pub async fn delete(account: AccountInPath) -> HttpResult {
accounts_service::delete(account.as_ref().id()).await?;
Ok(HttpResponse::Accepted().finish())
}