28 lines
910 B
TypeScript
28 lines
910 B
TypeScript
import { Result } from '@/lib/contracts/Result';
|
|
import { Service } from '@/lib/contracts/services/Service';
|
|
import { LeagueSettingsApiDto } from '@/lib/types/tbd/LeagueSettingsApiDto';
|
|
|
|
export class LeagueSettingsService implements Service {
|
|
async getSettingsData(leagueId: string): Promise<Result<LeagueSettingsApiDto, never>> {
|
|
// Mock data since backend not implemented
|
|
const mockData: LeagueSettingsApiDto = {
|
|
leagueId,
|
|
league: {
|
|
id: leagueId,
|
|
name: 'Mock League',
|
|
description: 'A mock league for demonstration',
|
|
visibility: 'public',
|
|
ownerId: 'owner-123',
|
|
createdAt: '2024-01-01T00:00:00Z',
|
|
updatedAt: '2024-01-01T00:00:00Z',
|
|
},
|
|
config: {
|
|
maxDrivers: 20,
|
|
scoringPresetId: 'preset-1',
|
|
allowLateJoin: true,
|
|
requireApproval: false,
|
|
},
|
|
};
|
|
return Result.ok(mockData);
|
|
}
|
|
} |