Reduce expiration

This commit is contained in:
MasseR committed 2025-04-01 12:42:27 +03:00
1 parent c13f01a012
commit a46fcfa3b1
1 file changed
+1 -1
+1 -1
View File
@@ -73,7 +73,7 @@ authenticate c = do
r <- liftIO $ post metrics SafeTransient "https://app.wallabag.it/oauth/v2/token" form
now <- liftIO getCurrentTime
let expiresIn = r ^? responseBody . key "expires_in" . _Integer . to fromIntegral . to secondsToNominalDiffTime
expireTime = fmap (`addUTCTime` now) expiresIn
expireTime = fmap (\x -> (x - 5) `addUTCTime` now) expiresIn
pure $ Auth <$> r ^? responseBody . key "access_token" . _String <*> expireTime
data WallabagException7g = MissingTokenException deriving (Show)