| import { NextResponse } from 'next/server' | |
| import { getEvents, getCount } from '@/lib/event-store' | |
| export async function GET(req: Request) { | |
| const { searchParams } = new URL(req.url) | |
| const limit = Math.min(parseInt(searchParams.get('limit') || '20'), 50) | |
| return NextResponse.json({ events: getEvents(limit), total: getCount() }) | |
| } | |