This commit is contained in:
2026-03-07 10:48:01 +03:30
parent af8367340e
commit 2938b93d9a
+2 -2
View File
@@ -23,13 +23,13 @@ export class BarnameService {
) { }
async createBarname(dto: CreateBarnameDto, business: Business, userId: string) {
const { description, driverName, driverPhone, carType, exitAt, origin, plaque, weight,attachments } = dto;
const { description, driverName, driverPhone, carType, exitAt, origin, plaque, weight, attachments } = dto;
const company = await this.em.findOne(Company, { business, user: { id: userId }, deletedAt: null });
if (!company) throw new BadRequestException(CompanyMessage.COMPANY_NOT_FOUND);
const bill = this.em.create(Barname,
{ carType, exitAt, origin, plaque, weight, business, description, driverName, driverPhone, company,attachments });
{ carType, exitAt, origin, plaque, weight, business, description, driverName, driverPhone, company, attachments });
await this.em.persistAndFlush(bill);