Correct Xero expiration query

This commit is contained in:
Rene Vergara 2023-01-24 10:18:16 -06:00
parent 927b213dff
commit 789211b06f
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
1 changed files with 1 additions and 2 deletions

View File

@ -283,8 +283,7 @@ findToken a = findOne (select ["address" =: a] "xerotokens")
findExpiringTokens :: UTCTime -> Action IO [Document]
findExpiringTokens now =
rest =<<
find
(select ["refExpires" =: ["$lte" =: addUTCTime 1728000 now]] "xerotokens")
find (select ["refExpires" =: ["$lte" =: addUTCTime 172800 now]] "xerotokens")
-- | Function to request accesstoken
requestXeroToken :: Pipe -> T.Text -> Xero -> T.Text -> T.Text -> IO Bool