Engineering manualAPI route source
/api/brands/change-evidence
Exact current route handler: hosted-app/app/api/brands/change-evidence/route.js
Methods: GET. Input signals: query parameters. Literal response-status signals: none detected.
Source: hosted-app/app/api/brands/change-evidence/route.js. Imports: ../../../../lib/brand-changes-reader.mjs, ../../../../lib/comprehensive-pull.mjs, ../../../../lib/supabase-rest.mjs, next/server. Exact source is shown for inspection; its presence does not prove authentication, validation or live behavior.
All API routes · API and execution contract
// Paged, source-aware comparisons. Reads saved data only; never runs providers.
import { NextResponse } from "next/server";
import { bearerTokenFromHeader } from "../../../../lib/comprehensive-pull.mjs";
import { supabaseConfigFromEnv } from "../../../../lib/supabase-rest.mjs";
import { getUnifiedBrandChanges } from "../../../../lib/brand-changes-reader.mjs";
export const runtime = "nodejs";
export const dynamic = "force-dynamic";
const PRIVATE = { "cache-control": "private, no-store", "x-content-type-options": "nosniff" };
export async function GET(request) {
const params = new URL(request.url).searchParams;
const args = { scope: "all" };
for (const key of ["domain", "read_id", "area", "cursor"]) if (params.has(key)) args[key] = params.get(key);
for (const key of ["limit", "max_bytes"]) if (params.has(key)) args[key] = Number(params.get(key));
const result = await getUnifiedBrandChanges({ args, token: bearerTokenFromHeader(request.headers.get("authorization")), config: supabaseConfigFromEnv(process.env) });
return NextResponse.json(result.body, { status: result.http_status, headers: PRIVATE });
}