From a46fcfa3b1e54458b3fadc4e4313544b7956860e Mon Sep 17 00:00:00 2001 From: Mats Rauhala Date: Tue, 1 Apr 2025 12:42:27 +0300 Subject: [PATCH] Reduce expiration --- src/Wallabag.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Wallabag.hs b/src/Wallabag.hs index 1eb4b37..de1df55 100644 --- a/src/Wallabag.hs +++ b/src/Wallabag.hs @@ -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)