Compare commits

..

3 commits

Author SHA1 Message Date
a8e1c1b4d8
Update Changelog 2023-01-24 10:21:17 -06:00
1a100fd8ca
Correct owner expiration query 2023-01-24 10:20:00 -06:00
789211b06f
Correct Xero expiration query 2023-01-24 10:18:16 -06:00
3 changed files with 9 additions and 3 deletions

View file

@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Owner expiration query
- Xero token expiration query
## [1.2.0] - 2023-01-09
### Added

View file

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

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