refactor: user relation
This commit is contained in:
parent
a74d8b63b1
commit
2bd30b735d
21 changed files with 607 additions and 185 deletions
|
|
@ -286,8 +286,8 @@ export class BranchController extends Controller {
|
|||
district: { connect: districtId ? { id: districtId } : undefined },
|
||||
subDistrict: { connect: subDistrictId ? { id: subDistrictId } : undefined },
|
||||
headOffice: { connect: headOfficeId ? { id: headOfficeId } : undefined },
|
||||
createdBy: req.user.name,
|
||||
updatedBy: req.user.name,
|
||||
createdBy: { connect: { id: req.user.sub } },
|
||||
updatedBy: { connect: { id: req.user.sub } },
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
@ -403,7 +403,7 @@ export class BranchController extends Controller {
|
|||
connect: headOfficeId ? { id: headOfficeId } : undefined,
|
||||
disconnect: headOfficeId === null || undefined,
|
||||
},
|
||||
updatedBy: req.user.name,
|
||||
updatedBy: { connect: { id: req.user.sub } },
|
||||
},
|
||||
where: { id: branchId },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue