CI / build + unit + e2e (pull_request) Failing after 12m34s
New terminal status 'ignored' + ignorePackage action + POST /api/packages/{packageId}/ignore
(no body, no penalty; top-up logic refills the market). Ignore button per open-package row in
the Jobs tab. OpenAPI gains the 13th endpoint; unit tests for the action (happy/409x5/404),
engine terminal-status coverage, and a new e2e spec test.
11 lines
576 B
TypeScript
11 lines
576 B
TypeScript
import { ignorePackage, performAction } from '@/lib/game/actions';
|
|
|
|
// POST /api/packages/:id/ignore (v0.29.0, ISS-047 part B) — no body. Dismisses an OPEN job so it
|
|
// leaves the market permanently; the top-up logic spawns a replacement on the next tick. No penalty,
|
|
// nothing else changes. 404 unknown id; 409 unless open. On success returns the full state snapshot.
|
|
|
|
export async function POST(_req: Request, ctx: { params: Promise<{ packageId: string }> }) {
|
|
const { packageId } = await ctx.params;
|
|
return performAction((inst) => ignorePackage(inst, packageId));
|
|
}
|