import { NextRequest, NextResponse } from 'next/server'; // GET /api/adops/preview — render banner preview HTML (screenshot fallback) export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url); const bannerUrl = searchParams.get('bannerUrl') || ''; const w = searchParams.get('w') || '728'; const h = searchParams.get('h') || '90'; const campaignId = searchParams.get('campaignId') || ''; const html = ` Banner Preview
Advertisement
AD PREVIEW
${bannerUrl ? `Banner Ad` : `
Banner Image (${w}×${h})
` }

Sample Article: Industry News Headline

This is a sample article to show how the banner appears in context on the publication page. The actual page will have real content from the publication's CMS.

Another Recent Story

Additional content to demonstrate the banner placement in a realistic editorial environment.

`; return new NextResponse(html, { headers: { 'Content-Type': 'text/html' }, }); }