website refactor

This commit is contained in:
2026-01-14 02:02:24 +01:00
parent 8d7c709e0c
commit 4522d41aef
291 changed files with 12763 additions and 9309 deletions

View File

@@ -0,0 +1,28 @@
import { LeaguesApiClient } from '@/lib/api/leagues/LeaguesApiClient';
import { DriversApiClient } from '@/lib/api/drivers/DriversApiClient';
/**
* League Settings Service - DTO Only
*
* Returns raw API DTOs. No ViewModels or UX logic.
* All client-side presentation logic must be handled by hooks/components.
*/
export class LeagueSettingsService {
constructor(
private readonly leagueApiClient: LeaguesApiClient,
private readonly driverApiClient: DriversApiClient
) {}
async getLeagueSettings(leagueId: string): Promise<any> {
// This would typically call multiple endpoints to gather all settings data
// For now, return a basic structure
return {
league: await this.leagueApiClient.getAllWithCapacityAndScoring(),
config: { /* config data */ }
};
}
async transferOwnership(leagueId: string, currentOwnerId: string, newOwnerId: string): Promise<{ success: boolean }> {
return this.leagueApiClient.transferOwnership(leagueId, currentOwnerId, newOwnerId);
}
}