From 75c3bdae5e6a8021de8a6b27d3993656553cccaa Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Wed, 29 Sep 2021 11:11:51 -0600 Subject: [PATCH] remove inject function --- src/Handler/Apps.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Handler/Apps.hs b/src/Handler/Apps.hs index bfec546..9ba31f3 100644 --- a/src/Handler/Apps.hs +++ b/src/Handler/Apps.hs @@ -30,10 +30,8 @@ import System.FilePath ( (<.>) import System.Posix.Files ( fileSize , getFileStatus ) -import Yesod.Core ( MonadHandler(HandlerSite) - , TypedContent +import Yesod.Core ( TypedContent , addHeader - , getYesod , notFound , respondSource , sendChunkBS @@ -76,11 +74,6 @@ pureLog = liftA2 (*>) ($logInfo . show) pure logRet :: ToJSON a => Handler a -> Handler a logRet = (>>= liftA2 (*>) ($logInfo . decodeUtf8 . BS.toStrict . encode) pure) -inject :: MonadHandler m => ReaderT (HandlerSite m) m a -> m a -inject action = do - env <- getYesod - runReaderT action env - data FileExtension = FileExtension FilePath (Maybe String) instance Show FileExtension where show (FileExtension f Nothing ) = f