mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
cleanup usages of removed appmgr call
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
/package/instructions/#PkgId InstructionsR GET -- get icons - can specify version with ?spec=<emver>
|
/package/instructions/#PkgId InstructionsR GET -- get icons - can specify version with ?spec=<emver>
|
||||||
|
|
||||||
-- TODO confirm needed
|
-- TODO confirm needed
|
||||||
/package/config/#PkgId AppConfigR GET -- get app config from appmgr -- ?spec={semver-spec}
|
|
||||||
/package/version/#Text VersionAppR GET -- get most recent appId version
|
/package/version/#Text VersionAppR GET -- get most recent appId version
|
||||||
!/sys/#SYS_EXTENSIONLESS SysR GET -- get most recent sys app -- ?spec={semver-spec}
|
!/sys/#SYS_EXTENSIONLESS SysR GET -- get most recent sys app -- ?spec={semver-spec}
|
||||||
/version VersionR GET
|
/version VersionR GET
|
||||||
|
|||||||
@@ -84,23 +84,6 @@ getAppManifestR appId = do
|
|||||||
(\bsSource -> respondSource "application/json" (bsSource .| awaitForever sendChunkBS))
|
(\bsSource -> respondSource "application/json" (bsSource .| awaitForever sendChunkBS))
|
||||||
where appExt = Extension (show appId) :: Extension "s9pk"
|
where appExt = Extension (show appId) :: Extension "s9pk"
|
||||||
|
|
||||||
getAppConfigR :: PkgId -> Handler TypedContent
|
|
||||||
getAppConfigR appId = do
|
|
||||||
appSettings <- appSettings <$> getYesod
|
|
||||||
let appsDir = (</> "apps") . resourcesDir $ appSettings
|
|
||||||
let appMgrDir = staticBinDir appSettings
|
|
||||||
av <- getVersionFromQuery appsDir appExt >>= \case
|
|
||||||
Nothing -> sendResponseStatus status404 ("Specified App Version Not Found" :: Text)
|
|
||||||
Just v -> pure v
|
|
||||||
let appDir = (<> "/") . (</> show av) . (</> show appId) $ appsDir
|
|
||||||
addPackageHeader appMgrDir appDir appExt
|
|
||||||
config <- sourceConfig appMgrDir
|
|
||||||
appDir
|
|
||||||
appExt
|
|
||||||
(\bsSource -> respondSource "application/json" (bsSource .| awaitForever sendChunkBS))
|
|
||||||
pure $ TypedContent "application/json" (toContent config)
|
|
||||||
where appExt = Extension (show appId) :: Extension "s9pk"
|
|
||||||
|
|
||||||
getAppR :: Extension "s9pk" -> Handler TypedContent
|
getAppR :: Extension "s9pk" -> Handler TypedContent
|
||||||
getAppR e = do
|
getAppR e = do
|
||||||
appResourceDir <- (</> "apps") . resourcesDir . appSettings <$> getYesod
|
appResourceDir <- (</> "apps") . resourcesDir . appSettings <$> getYesod
|
||||||
|
|||||||
Reference in New Issue
Block a user