pos-be/src/modules/transaction/profit-share-formula/infrastructure/profit-share-formula-read.c...

19 lines
732 B
TypeScript

import { Controller, Get, Param } from '@nestjs/common';
import { ProfitShareFormulaReadOrchestrator } from '../domain/usecases/profit-share-formula-read.orchestrator';
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { Public } from 'src/core/guards';
import { SalesPriceFormulaEntity } from '../../sales-price-formula/domain/entities/sales-price-formula.entity';
@ApiTags(`profit share formula - read`)
@Controller('profit-share-formula')
@Public(false)
@ApiBearerAuth('JWT')
export class ProfitShareFormulaReadController {
constructor(private orchestrator: ProfitShareFormulaReadOrchestrator) {}
@Get()
async detail(): Promise<SalesPriceFormulaEntity> {
return await this.orchestrator.detail();
}
}