Files
gridpilot.gg/core/analytics/application/use-cases/GetDashboardDataUseCase.ts
2025-12-20 12:55:07 +01:00

43 lines
983 B
TypeScript

import type { Logger } from '@core/shared/application';
export interface GetDashboardDataInput {}
export interface GetDashboardDataOutput {
totalUsers: number;
activeUsers: number;
totalRaces: number;
totalLeagues: number;
}
export class GetDashboardDataUseCase {
constructor(
private readonly logger: Logger,
) {}
async execute(): Promise<GetDashboardDataOutput> {
try {
// Placeholder implementation - would need repositories from identity and racing domains
const totalUsers = 0;
const activeUsers = 0;
const totalRaces = 0;
const totalLeagues = 0;
this.logger.info('Dashboard data retrieved', {
totalUsers,
activeUsers,
totalRaces,
totalLeagues,
});
return {
totalUsers,
activeUsers,
totalRaces,
totalLeagues,
};
} catch (error) {
this.logger.error('Failed to get dashboard data', { error });
throw error;
}
}
}