This commit is contained in:
Aaron Greenspan
2019-12-24 22:23:07 -07:00
parent b3f18c0e67
commit 5516f0827d
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