Use top-level rvote proposals endpoint (space-scoped route broken on server)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-15 09:34:17 -07:00
parent e5f4c7040e
commit 1ffebff24c
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ export async function GET(req: NextRequest) {
targetUrl = `${RVOTE_BASE}/api/spaces/${encodeURIComponent(slug)}`;
} else if (endpoint === 'proposals') {
const status = searchParams.get('status') || 'RANKING';
targetUrl = `${RVOTE_BASE}/api/s/${encodeURIComponent(slug)}/api/proposals?status=${status}&limit=10`;
// Use top-level proposals endpoint (space-scoped route has schema mismatch on server)
targetUrl = `${RVOTE_BASE}/api/proposals?status=${status}&limit=10`;
} else {
return NextResponse.json({ error: 'Invalid endpoint' }, { status: 400 });
}