Correct expiring owners query for paid

This commit is contained in:
Rene Vergara 2023-01-24 18:34:22 -06:00
parent 814d4c9ee5
commit bde97f9211
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -297,4 +297,7 @@ findOwnerById i =
findExpiringOwners :: UTCTime -> Action IO [Document] findExpiringOwners :: UTCTime -> Action IO [Document]
findExpiringOwners now = findExpiringOwners now =
rest =<< rest =<<
find (select ["expiration" =: ["$lte" =: addUTCTime 172800 now]] "owners") find
(select
["paid" =: True, "expiration" =: ["$lte" =: addUTCTime 172800 now]]
"owners")