improvement: change reopen ticket logic to use 'updatedAt'

This commit is contained in:
canove
2020-11-05 17:06:42 -03:00
parent f55e336b38
commit 3859f996d0

View File

@@ -116,7 +116,7 @@ const verifyTicket = async (
if (!ticket) { if (!ticket) {
ticket = await Ticket.findOne({ ticket = await Ticket.findOne({
where: { where: {
createdAt: { updatedAt: {
[Op.between]: [+subHours(new Date(), 2), +new Date()] [Op.between]: [+subHours(new Date(), 2), +new Date()]
}, },
contactId: groupContact ? groupContact.id : contact.id contactId: groupContact ? groupContact.id : contact.id