Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
SerpentBytes committed Mar 10, 2023
1 parent a884f7a commit 6eba94a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions app/queues/notifications/expiration-notification.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ const getRecordsByExpiration = (type: RecordType) => {
validTo: {
lte: dayjs().add(1, 'M').toDate(),
},
lastNotified: null || dayjs().subtract(30, 'd').toDate(),
OR: [
{
lastNotified: null,
},
{
lastNotified: dayjs().subtract(30, 'd').toDate(),
},
],
},
select: {
user: true,
Expand All @@ -68,7 +75,14 @@ const getRecordsByExpiration = (type: RecordType) => {
expiresAt: {
lte: dayjs().add(1, 'M').toDate(),
},
lastNotified: null || dayjs().subtract(30, 'd').toDate(),
OR: [
{
lastNotified: null,
},
{
lastNotified: dayjs().subtract(30, 'd').toDate(),
},
],
},
select: {
user: true,
Expand Down

0 comments on commit 6eba94a

Please sign in to comment.