view data fixes
This commit is contained in:
@@ -11,9 +11,15 @@ import { mapToPresentationError, type PresentationError } from '@/lib/contracts/
|
||||
* No DI container usage - constructs dependencies explicitly
|
||||
*/
|
||||
export class DriverRankingsPageQuery implements PageQuery<DriverRankingsViewData, void, PresentationError> {
|
||||
private readonly service: DriverRankingsService;
|
||||
|
||||
constructor(service?: DriverRankingsService) {
|
||||
this.service = service || new DriverRankingsService();
|
||||
}
|
||||
|
||||
async execute(): Promise<Result<DriverRankingsViewData, PresentationError>> {
|
||||
// Manual wiring: Service creates its own dependencies
|
||||
const service = new DriverRankingsService();
|
||||
const service = this.service;
|
||||
|
||||
// Fetch data using service
|
||||
const serviceResult = await service.getDriverRankings();
|
||||
|
||||
Reference in New Issue
Block a user