rebuild app as turbopack-first single-stack with internal api and openclaw tasks

This commit is contained in:
2026-02-23 23:38:06 -05:00
parent 5df09b714b
commit 6012dd3fcf
40 changed files with 1583 additions and 1578 deletions

View File

@@ -0,0 +1,22 @@
import { getStoreSnapshot } from '@/lib/server/store';
export async function GET(request: Request) {
const url = new URL(request.url);
const tickerFilter = url.searchParams.get('ticker')?.trim().toUpperCase();
const limitValue = Number(url.searchParams.get('limit') ?? 50);
const limit = Number.isFinite(limitValue)
? Math.min(Math.max(Math.trunc(limitValue), 1), 250)
: 50;
const snapshot = await getStoreSnapshot();
const filtered = tickerFilter
? snapshot.filings.filter((filing) => filing.ticker === tickerFilter)
: snapshot.filings;
const filings = filtered
.slice()
.sort((a, b) => Date.parse(b.filing_date) - Date.parse(a.filing_date))
.slice(0, limit);
return Response.json({ filings });
}