Skip to content
Clone
a06673b
22 lines 610 B Rust
use axum::extract::{Path, State};
use jwt::extractor::AuthAdmin;
use uuid::Uuid;
use crate::error::UserResult;
use crate::features::UserService;
#[utoipa::path(
post,
path = "/user/admin/deletions/{id}/complete",
tag = "user",
params(("id" = Uuid, Path, description = "Deletion request id.")),
responses((status = 204, description = "Deletion completed; sessions revoked.")),
security(("bearer_auth" = [])),
)]
pub(crate) async fn handler(
State(svc): State<UserService>,
_admin: AuthAdmin,
Path(id): Path<Uuid>,
) -> UserResult<()> {
svc.complete_deletion(id).await
}