@@ -37,8 +37,11 @@ export async function POST(req: NextRequest, ctx: { params: Promise<{ id: string
|
||||
}
|
||||
|
||||
const now = new Date();
|
||||
// `partial` behaves exactly like `pending` for claim purposes — it just
|
||||
// means a previous operator paused with some units done. Either is fair
|
||||
// game to resume.
|
||||
const updateResult = await prisma.operation.updateMany({
|
||||
where: { id, claimedByUserId: null, status: "pending" },
|
||||
where: { id, claimedByUserId: null, status: { in: ["pending", "partial"] } },
|
||||
data: {
|
||||
status: "in_progress",
|
||||
claimedByUserId: actor.id,
|
||||
|
||||
Reference in New Issue
Block a user