mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
agent: remove redundant fn
This commit is contained in:
committed by
Aiden McClelland
parent
b4d1db7e11
commit
b80634df83
@@ -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
|
||||
|
||||
8
agent/src/Lib/External/AppManifest.hs
vendored
8
agent/src/Lib/External/AppManifest.hs
vendored
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user