Brand Studio docs
Engineering manualAPI route source

/api/comprehensive/preview

Exact current route handler: hosted-app/app/api/comprehensive/preview/route.js

Methods: GET. Input signals: query parameters. Literal response-status signals: none detected.

Source: hosted-app/app/api/comprehensive/preview/route.js. Imports: ../../../../lib/comprehensive-pull.mjs, ../../../../lib/pull-preview.mjs, ../../../../lib/supabase-rest.mjs. Exact source is shown for inspection; its presence does not prove authentication, validation or live behavior.

All API routes · API and execution contract

import { readPullPreview } from '../../../../lib/pull-preview.mjs';
import { bearerTokenFromHeader } from '../../../../lib/comprehensive-pull.mjs';
import { supabaseConfigFromEnv } from '../../../../lib/supabase-rest.mjs';

export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';

export async function GET(request) {
  const result = await readPullPreview({
    pullId: new URL(request.url).searchParams.get('pull_id') || '',
    token: bearerTokenFromHeader(request.headers.get('authorization')),
    config: supabaseConfigFromEnv(process.env),
  });
  return Response.json(result.body, { status: result.http_status, headers: { 'Cache-Control': 'no-store' } });
}