import { NextResponse } from 'next/server' import { readMeta } from '@/lib/store' import { getSession } from '@/lib/session' export async function GET() { // Belt-and-suspenders auth check (middleware handles the primary check) const session = await getSession() if (!session) { return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) } const records = await readMeta() return NextResponse.json(records) }