From 9880bf912f3ea965e3dcc1caf2e478703e5a929e Mon Sep 17 00:00:00 2001 From: kittapath Date: Tue, 12 Nov 2024 17:19:07 +0700 Subject: [PATCH 1/2] no message --- src/controllers/ProfileController.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 09d81ccf..38634422 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -7897,15 +7897,16 @@ export class ProfileController extends Controller { }, }, }); - profileNoti.map((x) => ({ + let _profileNoti = profileNoti.map((x) => ({ receiverUserId: x.id, notiLink: "", })); + console.log(profileNoti); await new CallAPI() .PostData(req, "/placement/noti/profiles", { subject: body.subject, body: body.body, - receiverUserIds: profileNoti, + receiverUserIds: _profileNoti, payload: "", //แนบไฟล์ isSendMail: true, isSendInbox: true, From 87531f19ba3bbe977b52662fe6a302f2eef39ce7 Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 12 Nov 2024 17:39:14 +0700 Subject: [PATCH 2/2] test --- src/controllers/CommandController.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index cde51643..288eadc8 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3520,8 +3520,9 @@ export class CommandController extends Controller { @Request() req: RequestWithUser, @Body() body: { - refIds: { - refId: string; + refIds: string[]; + // refIds: { + // refId: string; // commandAffectDate: Date | null; // commandNo: string | null; // commandYear: number; @@ -3529,11 +3530,11 @@ export class CommandController extends Controller { // amount: Double | null; // positionSalaryAmount: Double | null; // mouthSalaryAmount: Double | null; - }[]; + // }[]; }, ) { const posMasters = await this.posMasterRepository.find({ - where: { id: In(body.refIds.map((x) => x.refId)) }, + where: { id: In(body.refIds/*.map((x) => x.refId)*/) }, }); const data = posMasters.map((_data) => ({ ..._data,