more cleanup

This commit is contained in:
Keagan McClelland
2021-09-29 14:57:06 -06:00
parent c485dce4a8
commit d6ae703915
6 changed files with 60 additions and 60 deletions

View File

@@ -114,14 +114,14 @@ recordMetrics pkg appVersion = do
sa <- runDB $ fetchApp $ pkg
case sa of
Nothing -> do
$logError $ show pkg <> " not found in database"
$logError $ [i|#{pkg} not found in database|]
notFound
Just a -> do
let appKey' = entityKey a
existingVersion <- runDB $ fetchAppVersion appVersion appKey'
case existingVersion of
Nothing -> do
$logError $ "Version: " <> show appVersion <> " not found in database"
$logError $ [i|#{pkg}@#{appVersion} not found in database|]
notFound
Just v -> runDB $ createMetric (entityKey a) (entityKey v)