25 lines
874 B
TypeScript
25 lines
874 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { SalesPriceFormulaEntity } from '../domain/entities/sales-price-formula.entity';
|
|
import { SalesPriceFormulaReadOrchestrator } from '../domain/usecases/sales-price-formula-read.orchestrator';
|
|
import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
|
|
import { Public } from 'src/core/guards';
|
|
|
|
@ApiTags(`sales price formulas - read`)
|
|
@Controller(['v1/sales-price-formula', 'v1/transaction-setting'])
|
|
@Public(false)
|
|
@ApiBearerAuth('JWT')
|
|
export class SalesPriceFormulaReadController {
|
|
constructor(private orchestrator: SalesPriceFormulaReadOrchestrator) {}
|
|
|
|
@Get()
|
|
async detail(): Promise<SalesPriceFormulaEntity> {
|
|
return await this.orchestrator.detail();
|
|
}
|
|
|
|
@Public(true)
|
|
@Get('detail')
|
|
async getTransactionSetting(): Promise<any> {
|
|
return await this.orchestrator.getTransactionSetting();
|
|
}
|
|
}
|