fixed little controller issue and wired up stats in top bar
This commit is contained in:
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user