remove core from pages

This commit is contained in:
2025-12-18 19:14:50 +01:00
parent 9814d9682c
commit 4a3087ae35
35 changed files with 552 additions and 354 deletions

View File

@@ -50,6 +50,11 @@ export class LeaguesApiClient extends BaseApiClient {
return this.patch<{ success: boolean }>(`/leagues/${leagueId}/members/${targetDriverId}/remove`, { performerDriverId });
}
/** Update a member's role in league */
updateMemberRole(leagueId: string, performerDriverId: string, targetDriverId: string, newRole: string): Promise<{ success: boolean }> {
return this.patch<{ success: boolean }>(`/leagues/${leagueId}/members/${targetDriverId}/role`, { performerDriverId, newRole });
}
/** Get league seasons */
getSeasons(leagueId: string): Promise<{ seasons: Array<{ id: string; status: string }> }> {
return this.get<{ seasons: Array<{ id: string; status: string }> }>(`/leagues/${leagueId}/seasons`);
@@ -77,4 +82,9 @@ export class LeaguesApiClient extends BaseApiClient {
newOwnerId,
});
}
/** Get races for a league */
getRaces(leagueId: string): Promise<{ races: any[] }> {
return this.get<{ races: any[] }>(`/leagues/${leagueId}/races`);
}
}