Sessions 5-7a: 955 tests, deployment ready

This commit is contained in:
Kev
2026-06-08 18:35:13 -04:00
parent 06b82624a2
commit 1fa04dc776
371 changed files with 49366 additions and 955 deletions
@@ -0,0 +1,28 @@
import { NextRequest, NextResponse } from 'next/server';
import { getUserFromRequest, jsonError } from '@/lib/auth-helpers';
import { cachedBackendJson } from '@/services/odds-cache';
export const dynamic = 'force-dynamic';
export async function GET(req: NextRequest) {
// The page itself shows the blurred preview for non-Desk users, so we
// still return a small set of signals (so the timeline scaffolding
// looks alive behind the blur). For Desk users, return full feed.
const user = await getUserFromRequest(req);
if (!user) return jsonError(401, 'Not signed in.');
const limit = user.tier === 'desk' ? 50 : 8;
try {
const data = await cachedBackendJson<{ signals: unknown[] }>(
`intelligence:feed:${limit}`,
'mixed',
'intelligence_feed',
`/api/intelligence/feed?limit=${limit}`,
60,
);
return NextResponse.json({ signals: Array.isArray(data?.signals) ? data.signals : [] });
} catch {
return NextResponse.json({ signals: [] });
}
}