diff --git a/src/controllers/01-branch-controller.ts b/src/controllers/01-branch-controller.ts index 73db470..dc94c0a 100644 --- a/src/controllers/01-branch-controller.ts +++ b/src/controllers/01-branch-controller.ts @@ -616,6 +616,8 @@ export class BranchController extends Controller { province: true, district: true, subDistrict: true, + contact: true, + bank: true, createdBy: true, updatedBy: true, }, @@ -637,6 +639,14 @@ export class BranchController extends Controller { minio.removeObject(MINIO_BUCKET, fileLocation.branch.image(branchId), { forceDelete: true, }), + minio.removeObject(MINIO_BUCKET, fileLocation.branch.map(branchId), { + forceDelete: true, + }), + ...data.bank.map(async (v) => { + await minio.removeObject(MINIO_BUCKET, fileLocation.branch.bank(branchId, v.id), { + forceDelete: true, + }); + }), ]); return data;