api client refactor
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { RaceResultsDetailDto } from '../dtos';
|
||||
import { RaceResultsDetailViewModel } from '../view-models';
|
||||
|
||||
export const presentRaceResultsDetail = (dto: RaceResultsDetailDto, currentUserId: string): RaceResultsDetailViewModel => {
|
||||
return new RaceResultsDetailViewModel(dto, currentUserId);
|
||||
export class RaceResultsDetailPresenter {
|
||||
present(dto: RaceResultsDetailDto, currentUserId?: string): RaceResultsDetailViewModel {
|
||||
return new RaceResultsDetailViewModel(dto, currentUserId);
|
||||
}
|
||||
}
|
||||
|
||||
export const presentRaceResultsDetail = (dto: RaceResultsDetailDto, currentUserId?: string): RaceResultsDetailViewModel => {
|
||||
const presenter = new RaceResultsDetailPresenter();
|
||||
return presenter.present(dto, currentUserId);
|
||||
};
|
||||
Reference in New Issue
Block a user