This commit is contained in:
@@ -27,6 +27,13 @@ export async function POST(req: NextRequest, ctx: { params: Promise<{ id: string
|
||||
if (existing.status === "completed") {
|
||||
throw new ApiError(409, "op_completed", "This step is already completed");
|
||||
}
|
||||
if (existing.status === "qc_failed") {
|
||||
throw new ApiError(
|
||||
409,
|
||||
"op_qc_failed",
|
||||
"This step failed QC and is locked until an admin resets it",
|
||||
);
|
||||
}
|
||||
if (existing.claimedByUserId && existing.claimedByUserId !== actor.id) {
|
||||
throw new ApiError(409, "op_claimed", "Another operator is already working on this step");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user