fix: Add missing fetchMicrodaoDashboard export
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user