feat: manage external source lifecycle
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s

This commit is contained in:
ik
2026-09-13 16:26:34 +07:00
parent bb8040d6fb
commit bc3ceb5dfe
12 changed files with 157 additions and 6 deletions
+2 -2
View File
@@ -156,13 +156,14 @@ def _external_out(item: ExternalObservation) -> ExternalObservationOut:
catch_report_id=item.catch_report_id, review_note=item.review_note,
missing_fields=missing_fields, source_payload=allowed_payload,
moderation_version=item.moderation_version,
source_check_status=item.source_check_status, source_checked_at=item.source_checked_at,
)
@router.get("/api/v1/admin/external-observations", response_model=list[ExternalObservationOut])
def admin_external_observations(
db: Db, _: Annotated[str, Depends(_admin)],
status: Literal["staged", "mapped", "ready", "published", "rejected", "review"] | None = None,
status: Literal["staged", "mapped", "ready", "published", "rejected", "withdrawn", "review"] | None = None,
source_system: str | None = None,
completeness: Literal["all", "complete", "incomplete"] = "all",
order: Literal["newest", "oldest", "risk"] = "newest",
@@ -328,4 +329,3 @@ def delete_report(report_id: UUID, db: Db, moderator: Annotated[str, Depends(_ad
db.commit()
public_cache.invalidate()
return Response(status_code=204)