Intelligence

Artifacts

Browse the repository, read documents, and manage the governance folders. Source, runtime, and infrastructure are read-only.

Repository
globals.csslayout.tsxnot-found.tsxpage.tsx
.gitignoreDockerfilenext-env.d.tsnext.config.mjspackage-lock.jsonpackage.jsonpostcss.config.mjsREADME.mdtailwind.config.tstsconfig.jsontsconfig.tsbuildinfo
README.md
CONSTITUTION_COMPLIANCE_AUDIT_V1.mdREADME.md
repositories/aaf-holdings/hq01/app/api/assets/route.ts
773 B
import { NextResponse } from "next/server";
import { searchAssets, assetFacets } from "@/lib/assets/ledger";

/**
 * The Asset Ledger collection (PASS M5).
 *
 *   GET /api/assets?mission=&type=&repository=&executive=&tag=&status=
 *     → filtered assets + filter facets
 */

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

export async function GET(request: Request) {
  const url = new URL(request.url);
  const get = (k: string) => url.searchParams.get(k) || undefined;
  const assets = searchAssets({
    mission: get("mission"),
    type: get("type"),
    repository: get("repository"),
    executive: get("executive"),
    tag: get("tag"),
    status: get("status"),
  });
  return NextResponse.json({ assets, facets: assetFacets() });
}

root · /srv/aaf