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

View file

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