Context - Housekeeping commit to capture all current ZXDB Explorer work before index-page performance optimizations. Includes - Server-rendered entry detail page with ISR and parallelized DB queries. - Node runtime for ZXDB API routes and params validation updates for Next 15. - ZXDB repository extensions (facets, label queries, category queries). - Cross-linking and Link-based prefetch across ZXDB UI. - Cache headers on low-churn list APIs. Notes - Follow-up commit will focus specifically on speeding up index pages via SSR initial data and ISR. Signed-off-by: Junie@lucy.xalior.com
14 lines
367 B
TypeScript
14 lines
367 B
TypeScript
import { listGenres } from "@/server/repo/zxdb";
|
|
|
|
export async function GET() {
|
|
const data = await listGenres();
|
|
return new Response(JSON.stringify({ items: data }), {
|
|
headers: {
|
|
"content-type": "application/json",
|
|
"cache-control": "public, max-age=0, s-maxage=3600, stale-while-revalidate=86400",
|
|
},
|
|
});
|
|
}
|
|
|
|
export const runtime = "nodejs";
|