Restrict IOE only to effect handlers via inject
This commit is contained in:
@@ -13,7 +13,7 @@ import Effectful.Error.Static (Error, runErrorNoCallStack, throwError)
|
||||
import Effectful.Reader.Static
|
||||
import Network.Wai.Handler.Warp (run)
|
||||
import Network.Wai.Middleware.Static ((>->), staticPolicy, noDots, addBase)
|
||||
import Servant hiding ((:>), throwError)
|
||||
import Servant hiding ((:>), throwError, inject)
|
||||
import qualified Servant as S
|
||||
|
||||
--
|
||||
@@ -45,6 +45,7 @@ runAppEff env = runEff
|
||||
. runReader env
|
||||
. runDatabaseIO
|
||||
. runLoggerPSQL
|
||||
. inject
|
||||
|
||||
runAppDebug :: AppEnv -> AppEff a -> IO (Either ServerError a)
|
||||
runAppDebug env = runEff
|
||||
@@ -52,6 +53,7 @@ runAppDebug env = runEff
|
||||
. runReader env
|
||||
. runDatabaseDebug
|
||||
. runLoggerConsole
|
||||
. inject
|
||||
|
||||
port :: Int
|
||||
port = 8080
|
||||
|
||||
Reference in New Issue
Block a user