pub async fn revoke_token(
pool: &PgPool,
actor: &Actor,
token_id: Uuid,
) -> AppResult<()>Expand description
Deletes an API token (its owner, or an administrator).
§Invariants
- Permission: the token is the actor’s own or the actor is an administrator (“not found” otherwise).
- Locks: none; the row is deleted in one statement.
- Audit:
token.revoke. - Notifications / webhooks: none.
- Atomic: one transaction.