Compare commits
3 commits
927b213dff
...
a8e1c1b4d8
Author | SHA1 | Date | |
---|---|---|---|
a8e1c1b4d8 | |||
1a100fd8ca | |||
789211b06f |
3 changed files with 9 additions and 3 deletions
|
@ -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/),
|
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).
|
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
|
## [1.2.0] - 2023-01-09
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -297,4 +297,4 @@ findOwnerById i =
|
||||||
findExpiringOwners :: UTCTime -> Action IO [Document]
|
findExpiringOwners :: UTCTime -> Action IO [Document]
|
||||||
findExpiringOwners now =
|
findExpiringOwners now =
|
||||||
rest =<<
|
rest =<<
|
||||||
find (select ["expiration" =: ["$lte" =: addUTCTime 1728000 now]] "owners")
|
find (select ["expiration" =: ["$lte" =: addUTCTime 172800 now]] "owners")
|
||||||
|
|
|
@ -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