fix(db): check callers against the adapter that actually runs

The self-hosted client was typed as a full Supabase client, so an old scoring poll called .single() on a plain promise and failed. The new DataClient only lists methods the adapter implements.

Co-Authored-By: Grok (agent loop)
This commit is contained in:
jesse-ux
2026-10-15 09:21:14 +08:00
co-authored by Grok (agent loop)
parent 9274491681
commit b184448871
19 changed files with 366 additions and 47 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ export async function GET() {
.order("updated_at", { ascending: false });
if (error) throw error;
const profiles = (data ?? []).map((row) => toClientProfile(row as Record<string, unknown>));
const profiles = (data ?? []).map((row: unknown) => toClientProfile(row as Record<string, unknown>));
return NextResponse.json({
profiles,
limit: MAX_SAVED_SUBJECTS,