diff --git a/app/api/ads/slots/[id]/install-embed/route.ts b/app/api/ads/slots/[id]/install-embed/route.ts index 5aa76c84..65d77da8 100644 --- a/app/api/ads/slots/[id]/install-embed/route.ts +++ b/app/api/ads/slots/[id]/install-embed/route.ts @@ -15,7 +15,6 @@ import { createClient } from "@/lib/supabase/server"; import { serviceClient } from "@/lib/supabase/service"; import { getOrMintInstallationToken } from "@/lib/github/installations"; import { installAdEmbed } from "@/lib/github/install-ad"; -import { AD_FORMAT_IDS } from "@/lib/ads/formats"; export const runtime = "nodejs"; @@ -24,8 +23,6 @@ const bodySchema = z.object({ repo: z.string().min(1).optional(), installation_id: z.number().int().positive().optional(), target_path: z.string().max(500).optional(), - // Which ad size to install. Defaults to the medium rectangle in the installer. - format: z.enum(AD_FORMAT_IDS as [string, ...string[]]).optional(), }); type BoundRepo = { @@ -144,7 +141,6 @@ export async function POST(request: NextRequest, ctx: { params: Promise<{ id: st owner: owner!, repo: repo!, slotId, - format: body.format, targetPath: body.target_path, }); await finalize({ diff --git a/components/ads/slot-manager.tsx b/components/ads/slot-manager.tsx index 01a1ad50..7ddaf38c 100644 --- a/components/ads/slot-manager.tsx +++ b/components/ads/slot-manager.tsx @@ -163,7 +163,7 @@ export function SlotManager({ const res = await fetch(`/api/ads/slots/${slot.id}/install-embed`, { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ ...(pick ?? {}), format: fmt }), + body: JSON.stringify(pick ?? {}), }); const json = await res.json(); if (!res.ok) { @@ -269,17 +269,26 @@ export function SlotManager({
{embed}
-