fix: return queue on POST /ticket

feat-hitphone-integration
gustavo-gsp 2024-06-14 12:18:15 -03:00
parent b5f9fbc558
commit 51fd8b4232
1 changed files with 8 additions and 0 deletions

View File

@ -380,6 +380,14 @@ export const store = async (req: Request, res: Response): Promise<Response> => {
}); });
} }
const queueQuery: any = await Queue.findOne({
where: { id: queueId },
attributes: ["id", "name", "color"],
raw: true
});
ticket.dataValues.queue = queueQuery
const io = getIO(); const io = getIO();
io.to(ticket.status).emit("ticket", { io.to(ticket.status).emit("ticket", {
action: "update", action: "update",