improvement: change ticket user after aceppting ticket

This commit is contained in:
canove
2020-09-25 22:37:32 -03:00
parent 9d87522ad9
commit abe0b84b83
3 changed files with 8 additions and 4 deletions

View File

@@ -67,7 +67,7 @@ export const update = async (
const { ticketId } = req.params;
const ticketData: TicketData = req.body;
const { ticket, oldStatus } = await UpdateTicketService({
const { ticket, oldStatus, ticketUser } = await UpdateTicketService({
ticketData,
ticketId
});
@@ -83,7 +83,8 @@ export const update = async (
io.to(ticket.status).to(ticketId).emit("ticket", {
action: "updateStatus",
ticket
ticket,
user: ticketUser
});
return res.status(200).json(ticket);