This commit is contained in:
Aaron Greenspan
2019-12-24 22:23:07 -07:00
parent 840acbcac6
commit 2188208ce0
2 changed files with 8 additions and 3 deletions

View File

@@ -52,7 +52,10 @@ getAppR (S9PK appId) = getApp appResourceDir appId
getApp :: FilePath -> FilePath -> Handler TypedContent
getApp rootDir appId = do
spec <- querySpecD mostRecentVersion <$> lookupGetParam "spec"
appVersions <- registeredAppVersions appId <$> loadRegistry rootDir
reg <- loadRegistry rootDir
putStrLn ("got registry" :: String)
let appVersions = registeredAppVersions appId reg
putStrLn $ "valid appversion for " <> appId <> ": " <> show (fmap version appVersions)
case getSpecifiedAppVersion spec appVersions of
Nothing -> respondSource typePlain sendFlush
Just (RegisteredAppVersion (_, filePath)) -> do