Correct Xero expiration query
This commit is contained in:
parent
927b213dff
commit
789211b06f
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue