From 789211b06f674051795a3945dcc609b75ea3d938 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Tue, 24 Jan 2023 10:18:16 -0600 Subject: [PATCH] Correct Xero expiration query --- src/Xero.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Xero.hs b/src/Xero.hs index e98921d..14091ce 100644 --- a/src/Xero.hs +++ b/src/Xero.hs @@ -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