view data fixes
This commit is contained in:
@@ -150,14 +150,14 @@ export class HealthRouteService implements Service {
|
||||
// Simulate database health check
|
||||
// In a real implementation, this would query the database
|
||||
await this.delay(50);
|
||||
|
||||
|
||||
const latency = Date.now() - startTime;
|
||||
|
||||
|
||||
// Simulate occasional database issues
|
||||
// if (Math.random() < 0.1 && attempt < this.maxRetries) {
|
||||
// throw new Error('Database connection timeout');
|
||||
// }
|
||||
|
||||
if (Math.random() < 0.1 && attempt < this.maxRetries) {
|
||||
throw new Error('Database connection timeout');
|
||||
}
|
||||
|
||||
return {
|
||||
status: 'healthy',
|
||||
latency,
|
||||
|
||||
@@ -25,6 +25,8 @@ export class LeagueScheduleService implements Service {
|
||||
// Map LeagueScheduleDTO to LeagueScheduleApiDto
|
||||
const apiDto: LeagueScheduleApiDto = {
|
||||
leagueId,
|
||||
seasonId: data.seasonId || '',
|
||||
published: data.published || false,
|
||||
races: data.races.map(race => ({
|
||||
id: race.id,
|
||||
name: race.name,
|
||||
|
||||
@@ -80,6 +80,9 @@ export class LeagueSettingsService implements Service {
|
||||
allowLateJoin: true,
|
||||
requireApproval: false,
|
||||
},
|
||||
presets: [],
|
||||
owner: null,
|
||||
members: [],
|
||||
};
|
||||
return Result.ok(mockData);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,16 @@ export class LeagueSponsorshipsService implements Service {
|
||||
status: 'pending',
|
||||
},
|
||||
],
|
||||
sponsorships: [
|
||||
{
|
||||
id: 'sponsorship-1',
|
||||
slotId: 'slot-1',
|
||||
sponsorId: 'sponsor-1',
|
||||
sponsorName: 'Acme Racing',
|
||||
requestedAt: '2024-09-01T10:00:00Z',
|
||||
status: 'approved',
|
||||
},
|
||||
],
|
||||
};
|
||||
return Result.ok(mockData);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,11 @@ export class LeagueWalletService implements Service {
|
||||
leagueId,
|
||||
balance: 15750.00,
|
||||
currency: 'USD',
|
||||
totalRevenue: 7500.00,
|
||||
totalFees: 1200.00,
|
||||
totalWithdrawals: 1200.00,
|
||||
pendingPayouts: 0,
|
||||
canWithdraw: true,
|
||||
transactions: [
|
||||
{
|
||||
id: 'txn-1',
|
||||
|
||||
@@ -16,6 +16,7 @@ import { EnhancedErrorReporter } from '@/lib/infrastructure/EnhancedErrorReporte
|
||||
import { ConsoleLogger } from '@/lib/infrastructure/logging/ConsoleLogger';
|
||||
import { CompleteOnboardingInputDTO } from '@/lib/types/generated/CompleteOnboardingInputDTO';
|
||||
import { CompleteOnboardingOutputDTO } from '@/lib/types/generated/CompleteOnboardingOutputDTO';
|
||||
import { GetDriverOutputDTO } from '@/lib/types/generated/GetDriverOutputDTO';
|
||||
import { RequestAvatarGenerationInputDTO } from '@/lib/types/generated/RequestAvatarGenerationInputDTO';
|
||||
import { RequestAvatarGenerationOutputDTO } from '@/lib/types/generated/RequestAvatarGenerationOutputDTO';
|
||||
|
||||
@@ -44,7 +45,7 @@ export class OnboardingService implements Service {
|
||||
}
|
||||
}
|
||||
|
||||
async checkCurrentDriver(): Promise<Result<unknown, DomainError>> {
|
||||
async checkCurrentDriver(): Promise<Result<GetDriverOutputDTO | null, DomainError>> {
|
||||
try {
|
||||
const result = await this.apiClient.getCurrent();
|
||||
return Result.ok(result);
|
||||
|
||||
Reference in New Issue
Block a user