import { storedUrlFor } from "@/lib/clips/stored"; import { fail, ok } from "../../research/_respond"; export const dynamic = "force-dynamic"; // GET ?project&clip | ?channel&video -> { stored, host?, platform? } // // Whether the span's record stores a media file address the editor can cut a // window from (release 32 R6, lib/clips/stored.ts). Every umtool fetch surface // asks before it offers "Cut from the stored media URL". export async function GET(request: Request) { try { const u = new URL(request.url); const g = (k: string) => u.searchParams.get(k)?.trim() || undefined; return ok(await storedUrlFor({ project: g("project"), clip: g("clip"), channel: g("channel"), video: g("video") })); } catch (e) { return fail(e); } }