fix: return queue on POST /ticket
parent
b5f9fbc558
commit
51fd8b4232
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue