From e17aea65ac633985b255209672b7953c42300e5e Mon Sep 17 00:00:00 2001 From: Michal Kleczek Date: Wed, 5 Feb 2025 05:17:40 +0100 Subject: [PATCH] postgrest-style run updates --- src/PostgREST/AppState.hs | 2 +- src/PostgREST/Auth.hs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PostgREST/AppState.hs b/src/PostgREST/AppState.hs index 191842335d..ac623f1033 100644 --- a/src/PostgREST/AppState.hs +++ b/src/PostgREST/AppState.hs @@ -85,7 +85,7 @@ data AuthResult = AuthResult } data JwtCacheState = JwtCacheState - { cache :: C.Cache ByteString AuthResult + { cache :: C.Cache ByteString AuthResult , purgeLock :: MVar ()} data AppState = AppState diff --git a/src/PostgREST/Auth.hs b/src/PostgREST/Auth.hs index 434d5e2769..965c5c02f2 100644 --- a/src/PostgREST/Auth.hs +++ b/src/PostgREST/Auth.hs @@ -10,8 +10,8 @@ Authentication should always be implemented in an external service. In the test suite there is an example of simple login function that can be used for a very simple authentication system inside the PostgreSQL database. -} +{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} -{-# LANGUAGE LambdaCase #-} module PostgREST.Auth ( AuthResult (..) , getResult @@ -46,7 +46,8 @@ import System.Clock (TimeSpec (..)) import System.IO.Unsafe (unsafePerformIO) import System.TimeIt (timeItT) -import PostgREST.AppState (AppState, AuthResult (..), JwtCacheState(..), getConfig, +import PostgREST.AppState (AppState, AuthResult (..), + JwtCacheState (..), getConfig, getJwtCacheState, getTime) import PostgREST.Config (AppConfig (..), FilterExp (..), JSPath, JSPathExp (..))