fixed little controller issue and wired up stats in top bar

This commit is contained in:
roormonger
2026-03-23 16:43:09 -04:00
parent 9e8f148a10
commit f6ae56c848
5 changed files with 45 additions and 13 deletions

View File

@@ -126,6 +126,12 @@ export const rommApiClient = {
return json.items ? json.items.map(mapRomToGame) : [];
},
async fetchStats(): Promise<any> {
const res = await fetch(`${this.apiBase}/stats`, { headers: this.headers });
if (!res.ok) throw new Error('Failed to fetch stats.');
return res.json();
},
async fetchCollections(): Promise<RommCollection[]> {
const res = await fetch(`${this.apiBase}/collections`, { headers: this.headers });
if (!res.ok) throw new Error('Failed to fetch collections meta.');