fix: Add missing fetchMicrodaoDashboard export

This commit is contained in:
Apple
2025-12-02 09:01:10 -08:00
parent 742c238b3b
commit cf0b3feee0

View File

@@ -122,3 +122,17 @@ export async function ensureOrchestratorRoom(slug: string): Promise<CityRoomSumm
return res.json();
}
/**
* Fetch MicroDAO dashboard data
*/
export async function fetchMicrodaoDashboard(slug: string): Promise<MicrodaoDashboard> {
const res = await fetch(`/api/microdao/${encodeURIComponent(slug)}/dashboard`);
if (!res.ok) {
const error = await res.json().catch(() => ({}));
throw new Error(error.detail || error.error || "Failed to fetch MicroDAO dashboard");
}
return res.json();
}