refactor core presenters
This commit is contained in:
@@ -4,15 +4,17 @@
|
||||
* Retrieves general sponsorship pricing tiers.
|
||||
*/
|
||||
|
||||
import type { GetSponsorshipPricingViewModel } from '../presenters/IGetSponsorshipPricingPresenter';
|
||||
import type { GetSponsorshipPricingOutputPort } from '../ports/output/GetSponsorshipPricingOutputPort';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
|
||||
export class GetSponsorshipPricingUseCase {
|
||||
constructor() {}
|
||||
|
||||
async execute(): Promise<Result<GetSponsorshipPricingViewModel, ApplicationErrorCode<'NO_ERROR'>>> {
|
||||
const viewModel: GetSponsorshipPricingViewModel = {
|
||||
async execute(): Promise<Result<GetSponsorshipPricingOutputPort, ApplicationErrorCode<'NO_ERROR'>>> {
|
||||
const outputPort: GetSponsorshipPricingOutputPort = {
|
||||
entityType: 'season',
|
||||
entityId: '',
|
||||
pricing: [
|
||||
{ id: 'tier-bronze', level: 'Bronze', price: 100, currency: 'USD' },
|
||||
{ id: 'tier-silver', level: 'Silver', price: 250, currency: 'USD' },
|
||||
@@ -20,6 +22,6 @@ export class GetSponsorshipPricingUseCase {
|
||||
],
|
||||
};
|
||||
|
||||
return Result.ok(viewModel);
|
||||
return Result.ok(outputPort);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user