app.routers.decisions¶
POST /api/v1/records/{id}/decisions: accept or reject content.
Needs a signed-in caller with read; reviewing itself is decided by
the approval policy, not by a permission. All checks and error codes
live in app.services.decisions; the response is the stored,
append-only event (201) with server-set id and timestamp.
- app.routers.decisions.reviewer_from(principal)¶
Describe an authenticated caller as a (potential) reviewer.
- app.routers.decisions.post_decision(record_id, body, principal=Depends(dependency=<function require_permission.<locals>._check>, use_cache=True, scope=None), provider=Depends(dependency=<function get_store_provider>, use_cache=True, scope=None), runtime=Depends(dependency=<function get_catalog_runtime>, use_cache=True, scope=None))¶
Record an accept/reject decision for the record’s current digest.
- Parameters:
record_id (
UUID) – Record id.body (
DecisionIn) – Action, optional comment and expected digest.principal (
Principal) – The authenticated caller (readrequired).provider (
CatalogStoreProvider) – Storage provider (overridden by tests).runtime (
CatalogRuntime|None) – Startup configuration state (approval policy).
- Return type:
- Returns:
The stored event.