เพิ่มแนบไฟล์คำสั่งในรายการแจ้งเตือน #1784
This commit is contained in:
parent
ef7a8bc0e8
commit
35eec3a5f5
2 changed files with 25 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ import { PosMasterAct } from "../entities/PosMasterAct";
|
|||
import { PermissionOrg } from "../entities/PermissionOrg";
|
||||
import { sendWebSocket } from "./webSocket";
|
||||
import { CreatePosMasterHistoryOfficer } from "./PositionService";
|
||||
import { PayloadSendNoti } from "../interfaces/utils";
|
||||
|
||||
export let sendToQueue: (payload: any) => void;
|
||||
export let sendToQueueOrg: (payload: any) => void;
|
||||
|
|
@ -83,7 +84,7 @@ export async function init() {
|
|||
|
||||
console.log("[AMQ] Listening for message...");
|
||||
createConsumer(queue, channel, handler), //----> (3) Process Consumer
|
||||
createConsumer(queue_org, channel, handler_org);
|
||||
createConsumer(queue_org, channel, handler_org);
|
||||
createConsumer(queue_org_draft, channel, handler_org_draft);
|
||||
createConsumer(queue_command_noti, channel, handler_command_noti);
|
||||
// createConsumer(queue2, channel, handler2);
|
||||
|
|
@ -445,6 +446,7 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
|
|||
}))
|
||||
: [];
|
||||
|
||||
const payloadStr = await PayloadSendNoti(command.id);
|
||||
const profilesSendRequest = new CallAPI()
|
||||
.PostData(
|
||||
{ headers: { authorization: token } },
|
||||
|
|
@ -453,7 +455,7 @@ async function handler_command_noti(msg: amqp.ConsumeMessage): Promise<boolean>
|
|||
subject: `${command.issue}`,
|
||||
body: `${command.issue}`,
|
||||
receiverUserIds: profilesSend,
|
||||
payload: "", // แนบไฟล์ (ถ้าจำเป็น)
|
||||
payload: payloadStr, // แนบไฟล์ (ถ้าจำเป็น)
|
||||
},
|
||||
false,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue