From 87bb534ebfe1522d3153d529b9b2f02c5f871ab1 Mon Sep 17 00:00:00 2001 From: Keagan McClelland Date: Fri, 27 Dec 2019 23:25:55 -0700 Subject: [PATCH] changes unfindable versions to 404's --- src/Handler/Apps.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler/Apps.hs b/src/Handler/Apps.hs index bc48459..b496c0a 100644 --- a/src/Handler/Apps.hs +++ b/src/Handler/Apps.hs @@ -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