fix checkedNotesAt issue

This commit is contained in:
keyan 2022-03-01 11:04:44 -06:00
parent 9eced2b334
commit 50f10550b8
1 changed files with 15 additions and 12 deletions

View File

@ -210,19 +210,22 @@ export default {
return true
}
const job = await models.item.findFirst({
where: {
status: {
not: 'STOPPED'
},
maxBid: {
not: null
},
statusUpdatedAt: {
gt: user.checkedNotesAt
}
const where = {
status: {
not: 'STOPPED'
},
maxBid: {
not: null
}
})
}
if (user.checkedNotesAt) {
where.statusUpdatedAt = {
gt: user.checkedNotesAt
}
}
const job = user.checkedNotesAt && await models.item.findFirst({ where })
if (job) {
return true
}