refactor: dtos validation

This commit is contained in:
Ahmed Bouhuolia
2025-03-20 05:42:19 +02:00
parent fd65ee9428
commit 136cc907bb
105 changed files with 1641 additions and 366 deletions

View File

@@ -15,6 +15,7 @@ import { Vendor } from '@/modules/Vendors/models/Vendor';
import { Knex } from 'knex';
import { TransactionLandedCostEntriesService } from '@/modules/BillLandedCosts/TransactionLandedCostEntries.service';
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
import { EditBillDto } from '../dtos/Bill.dto';
@Injectable()
export class EditBillService {
@@ -46,7 +47,7 @@ export class EditBillService {
* @param {IBillEditDTO} billDTO - The given new bill details.
* @return {Promise<IBill>}
*/
public async editBill(billId: number, billDTO: IBillEditDTO): Promise<Bill> {
public async editBill(billId: number, billDTO: EditBillDto): Promise<Bill> {
// Retrieve the given bill or throw not found error.
const oldBill = await this.billModel()
.query()