diff --git a/app/Main.hs b/app/Main.hs index 9b62e97..cec518b 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -12,9 +12,16 @@ import Prelude as P import Crypto.JWT hiding (Context, header) +import Control.Concurrent.STM.TVar import Control.Concurrent.STM (newTQueueIO) import Control.Concurrent (forkIO) +import Control.Lens hiding (Context) + +import Control.Monad (void, unless) + +import Control.Monad.Reader + import Servant import Servant.Server.Experimental.Auth import qualified Servant.OpenApi as OA @@ -22,13 +29,19 @@ import Servant.Swagger.UI import Servant.RawM.Server import Data.Set as S (empty) + import qualified Data.ByteString.Lazy as B import Data.ByteString.Char8 as B8 hiding (putStrLn) + import qualified Data.Text as T import qualified Data.Text.Encoding as TE + import Data.String + import Data.Yaml + import Data.Version (showVersion) + import qualified Data.OpenApi as OA hiding (Server) import Database.PostgreSQL.Simple @@ -39,12 +52,6 @@ import Network.Wai import Network.Wai.Logger import Network.Wai.Handler.Warp -import Control.Monad.Reader - -import Control.Concurrent.STM.TVar - -import Control.Lens hiding (Context) - import Options.Applicative import System.Clock (TimeSpec(..)) @@ -146,7 +153,6 @@ main = do , rsJWTSecret = fromOctets . B.fromStrict $ TE.encodeUtf8 jwt_secret } - expirationSpec = TimeSpec 5 0 -- five seconds runSettings settings (app initState) where opts = info (options <**> helper) diff --git a/src/Control/Settings.hs b/src/Control/Settings.hs index a767c19..fff0c1e 100644 --- a/src/Control/Settings.hs +++ b/src/Control/Settings.hs @@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} module Control.Settings where +import Control.Monad (void, unless) + import Control.Monad.Reader import Servant