Initial commit

This commit is contained in:
admin
2026-05-26 22:46:00 +02:00
commit 7e2c2ff89c
256 changed files with 51523 additions and 0 deletions
@@ -0,0 +1,16 @@
import { NextRequest, NextResponse } from "next/server";
import { assertLocalRequest } from "@/lib/api/localOnly";
import { cancelJob } from "@/lib/whisperjav/queue";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
export async function POST(req: NextRequest, ctx: { params: Promise<{ id: string }> }) {
const blocked = assertLocalRequest(req);
if (blocked) return blocked;
const { id } = await ctx.params;
const ok = cancelJob(id);
if (!ok) return NextResponse.json({ error: "Not found or not cancellable" }, { status: 404 });
return NextResponse.json({ ok: true });
}