changes unfindable versions to 404's

This commit is contained in:
Keagan McClelland
2019-12-27 23:25:55 -07:00
parent 16188bc898
commit 4ca069f265

View File

@@ -60,11 +60,11 @@ getApp rootDir appId = do
let appVersions = registeredAppVersions appId reg
putStrLn $ "valid appversion for " <> appId <> ": " <> show (fmap version appVersions)
case getSpecifiedAppVersion spec appVersions of
Nothing -> respondSource typePlain sendFlush
Nothing -> notFound
Just (RegisteredAppVersion (_, filePath)) -> do
exists <- liftIO $ doesFileExist filePath
if exists
then respondSource typePlain $ CB.sourceFile filePath .| awaitForever sendChunkBS
else respondSource typePlain sendFlush
else notFound