diff --git a/src/app/api/cards/[id]/reprocess/route.ts b/src/app/api/cards/[id]/reprocess/route.ts index 87fc2c8..cd96056 100644 --- a/src/app/api/cards/[id]/reprocess/route.ts +++ b/src/app/api/cards/[id]/reprocess/route.ts @@ -14,9 +14,9 @@ export async function POST( return NextResponse.json({ error: "Card not found" }, { status: 404 }); } - if (card.ocrStatus !== "error") { + if (card.ocrStatus === "processing") { return NextResponse.json( - { error: `Cannot reprocess card with status "${card.ocrStatus}"` }, + { error: "Card is already being processed" }, { status: 400 } ); } diff --git a/src/app/cards/[id]/page.tsx b/src/app/cards/[id]/page.tsx index 59e184c..3b6a2a0 100644 --- a/src/app/cards/[id]/page.tsx +++ b/src/app/cards/[id]/page.tsx @@ -253,7 +253,7 @@ export default function CardDetailPage() {
- {ocrStatus === "error" && ( + {ocrStatus !== "processing" && (