import { paletteItems } from "@peppa/core"; import { currentUser } from "@/lib/auth"; import { db } from "@/lib/db"; export const dynamic = "force-dynamic"; /** Command palette data (PEP-52): projects, stories, runners and open questions of the user's projects. */ export async function GET() { const user = await currentUser(); if (!user) return Response.json({ error: "unauthorized" }, { status: 401 }); return Response.json({ items: await paletteItems(db, user.id) }, { headers: { "Cache-Control": "private, no-store" } }); }