import { syncAction } from "../../../channels/[slug]/pipelineActions"; import { jobResponse, ops, optBool, optString, reqSlug } from "../_lib"; export const dynamic = "force-dynamic"; // POST { slug: string, full?: boolean, queueKey?: string } -> { ok: true, jobId } // // `full` forces the periodic whole-listing sweep now; without it the job // decides for itself from the configured cadence. export async function POST(request: Request) { return ops(request, ["slug", "full", "queueKey"], async (body) => jobResponse( await syncAction( reqSlug(body, "slug"), optString(body, "queueKey"), optBool(body, "full"), ), ), ); }