import { archivePress } from "@/lib/library/presses.mjs"; import { ask, press } from "@/lib/library/route"; export const dynamic = "force-dynamic"; // POST { lib, handle, name?, dryRun? } -> { ok, slug, dryRun?, fields?, jobIds?, sentence } // // THE POSTS LIBRARY PAGE'S "ARCHIVE THIS ACCOUNT" (lane x-trending-publish): // the editor's `x-search-lead`, action "archive", for an account that wrote a // post the library holds — `-x`, an X channel on NO site that names // nothing of the library. The page's press only (lib/library/route.ts). IT // ASKS X NOTHING, now or later: this route never sends "fetch", and the editor // makes the channel with SYNC OFF (a never-synced channel with a URL would // otherwise be fetched at the scheduler's next tick). The answer's sentence is // the editor's: it says how to turn sync on and run the first fetch. export async function POST(request: Request) { return press(request, (body) => archivePress(ask, body)); }