Compare commits

...

2 Commits

Author SHA1 Message Date
shancheas e92f325807 fix: make transaction setting public 2025-05-02 11:25:33 +07:00
shancheas 66d76634b7 fix: find transactionSettingData with parameter 2025-05-02 09:02:45 +07:00
3 changed files with 5 additions and 1 deletions

View File

@ -48,7 +48,9 @@ export class SalesPriceFormulaDataService extends BaseDataService<SalesPriceForm
}
async sentToBlackHole() {
const transactionSettingData = await this.transactionSetting.findOne({});
const transactionSettingData = await this.transactionSetting.findOne({
where: {},
});
const percentage = transactionSettingData?.value ?? 100;
// const transactionPercentage = Math.floor(Math.random() * 100) + 1;

View File

@ -25,6 +25,7 @@ export class SalesPriceFormulaDataController {
return await this.orchestrator.update(data);
}
@Public(true)
@Put()
async updateTransactionSetting(
@Body() data: TransactionSettingDto,

View File

@ -16,6 +16,7 @@ export class SalesPriceFormulaReadController {
return await this.orchestrator.detail();
}
@Public(true)
@Get('detail')
async getTransactionSetting(): Promise<any> {
return await this.orchestrator.getTransactionSetting();