diff --git a/src/controllers/employee-controller.ts b/src/controllers/employee-controller.ts index ab43b07..a4800fd 100644 --- a/src/controllers/employee-controller.ts +++ b/src/controllers/employee-controller.ts @@ -182,7 +182,7 @@ type EmployeeUpdate = { coverageExpireDate?: Date | null; }[]; - employeeOtherInfo: { + employeeOtherInfo?: { citizenId?: string | null; fatherFirstName?: string | null; fatherLastName?: string | null; @@ -656,11 +656,7 @@ export class EmployeeController extends Controller { } if (record.status !== Status.CREATED) { - throw new HttpError( - HttpStatus.FORBIDDEN, - "Employee is in used.", - "employeeInUsed", - ); + throw new HttpError(HttpStatus.FORBIDDEN, "Employee is in used.", "employeeInUsed"); } return await prisma.employee.delete({ where: { id: employeeId } });