remove inject function

This commit is contained in:
Keagan McClelland
2021-09-29 11:11:51 -06:00
parent a8982c48e9
commit 75c3bdae5e

View File

@@ -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