website refactor
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Result } from '@/lib/contracts/Result';
|
||||
import { PageQuery } from '@/lib/contracts/page-queries/PageQuery';
|
||||
import { PresentationError, mapToPresentationError } from '@/lib/contracts/page-queries/PresentationError';
|
||||
import { RacesViewData } from '@/lib/view-data/races/RacesViewData';
|
||||
import { RacesViewData } from '@/lib/view-data/RacesViewData';
|
||||
import { RacesService } from '@/lib/services/races/RacesService';
|
||||
import { RacesViewDataBuilder } from '@/lib/builders/view-data/RacesViewDataBuilder';
|
||||
|
||||
@@ -27,10 +27,4 @@ export class RacesPageQuery implements PageQuery<RacesViewData, void> {
|
||||
const viewData = RacesViewDataBuilder.build(result.unwrap());
|
||||
return Result.ok(viewData);
|
||||
}
|
||||
|
||||
// Static method to avoid object construction in server code
|
||||
static async execute(): Promise<Result<RacesViewData, PresentationError>> {
|
||||
const query = new RacesPageQuery();
|
||||
return await query.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user