further test setup with hie

This commit is contained in:
Lucy Cifferello
2020-04-16 11:39:26 -06:00
parent d3703a51af
commit 08654c3b2c
10 changed files with 97 additions and 85 deletions

View File

@@ -40,20 +40,17 @@ instance Show FileExtension where
getAppsManifestR :: Handler TypedContent
getAppsManifestR = do
AppSettings{..} <- appSettings <$> getYesod
let appResourceDir = (resourcesDir . appSettings <$> getYesod) </> "apps" </> "apps.yaml"
appResourceDir <- (</> "apps" </> "apps.yaml") . resourcesDir . appSettings <$> getYesod
respondSource typePlain $ CB.sourceFile appResourceDir .| awaitForever sendChunkBS
getSysR :: Extension "" -> Handler TypedContent
getSysR e = do
AppSettings{..} <- appSettings <$> getYesod
let sysResourceDir = resourcesDir </> "sys"
sysResourceDir <- (</> "sys") . resourcesDir . appSettings <$> getYesod
getApp sysResourceDir e
getAppR :: Extension "s9pk" -> Handler TypedContent
getAppR e = do
AppSettings{..} <- appSettings <$> getYesod
let appResourceDir = resourcesDir </> "apps" </> "apps.yaml"
appResourceDir <- (</> "apps" </> "apps.yaml") . resourcesDir . appSettings <$> getYesod
getApp appResourceDir e
getApp :: KnownSymbol a => FilePath -> Extension a -> Handler TypedContent