agent: remove redundant fn

This commit is contained in:
Aaron Greenspan
2021-01-12 11:51:47 -07:00
committed by Aiden McClelland
parent b4d1db7e11
commit b80634df83
2 changed files with 3 additions and 7 deletions

View File

@@ -253,7 +253,7 @@ getInstalledAppsLogic = do
, appInstalledPreviewStatus = s
, appInstalledPreviewVersionInstalled = v
, appInstalledPreviewTorAddress = infoResTorAddress
, appInstalledPreviewUi = AppManifest.hasUi infoResManifest
, appInstalledPreviewUi = AppManifest.uiAvailable infoResManifest
}
pure $ HML.elems $ HML.union installingPreviews installedPreviews

View File

@@ -62,8 +62,8 @@ data AppManifest where
, appManifestDependencies :: HM.HashMap AppId VersionRange
} -> AppManifest
hasUi :: AppManifest -> Bool
hasUi AppManifest {..} = isJust $ HM.lookup 80 appManifestPortMapping
uiAvailable :: AppManifest -> Bool
uiAvailable AppManifest {..} = isJust $ HM.lookup 80 appManifestPortMapping
instance FromJSON AppManifest where
parseJSON = withObject "App Manifest " $ \o -> do
@@ -89,7 +89,3 @@ getAppManifest appId = do
base <- ask @"filesystemBase"
ExceptT $ first (ManifestParseE appId) <$> liftIO
(Yaml.decodeFileEither . toS $ (appMgrAppPath appId <> "manifest.yaml") `relativeTo` base)
uiAvailable :: AppManifest -> Bool
uiAvailable = \case
AppManifest { appManifestPortMapping } -> elem 80 (HM.keys appManifestPortMapping)