refactor api modules
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { GetSponsorshipPricingOutputPort } from '@core/racing/application/ports/output/GetSponsorshipPricingOutputPort';
|
||||
import type { GetEntitySponsorshipPricingResult } from '@core/racing/application/use-cases/GetEntitySponsorshipPricingUseCase';
|
||||
import { GetEntitySponsorshipPricingResultDTO } from '../dtos/GetEntitySponsorshipPricingResultDTO';
|
||||
|
||||
export class GetEntitySponsorshipPricingPresenter {
|
||||
@@ -8,7 +8,7 @@ export class GetEntitySponsorshipPricingPresenter {
|
||||
this.result = null;
|
||||
}
|
||||
|
||||
present(output: GetSponsorshipPricingOutputPort | null) {
|
||||
present(output: GetEntitySponsorshipPricingResult | null) {
|
||||
if (!output) {
|
||||
this.result = {
|
||||
entityType: 'season',
|
||||
@@ -21,11 +21,11 @@ export class GetEntitySponsorshipPricingPresenter {
|
||||
this.result = {
|
||||
entityType: output.entityType,
|
||||
entityId: output.entityId,
|
||||
pricing: output.pricing.map(item => ({
|
||||
id: item.id,
|
||||
level: item.level,
|
||||
pricing: output.tiers.map(item => ({
|
||||
id: item.name,
|
||||
level: item.name,
|
||||
price: item.price,
|
||||
currency: item.currency,
|
||||
currency: 'USD',
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user