fix: remove ticket from all users when deleted

This commit is contained in:
canove
2020-09-25 21:17:41 -03:00
parent 6c63abf29c
commit eb23775948
7 changed files with 25 additions and 12 deletions

View File

@@ -81,7 +81,7 @@ export const update = async (
});
}
io.to(ticket.status).emit("ticket", {
io.to(ticket.status).to(ticketId).emit("ticket", {
action: "updateStatus",
ticket
});
@@ -99,7 +99,7 @@ export const remove = async (
const io = getIO();
io.to(ticket.status)
.to("notification")
.to(ticketId)
.emit("ticket", {
action: "delete",
ticketId: +ticketId