flowstate / src /app /api /torque /events /recent /route.ts
muthuk1's picture
feat: full Torque integration — live events, toast, bulk rescue, auto-scan
c6b6c96
raw
history blame contribute delete
338 Bytes
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() })
}