appmgr inspect is back

This commit is contained in:
Aiden McClelland
2021-07-01 16:51:03 -06:00
committed by Aiden McClelland
parent 3f416dda1b
commit 0739690dcb
10 changed files with 160 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ use std::sync::Arc;
use bollard::Docker;
use patch_db::PatchDb;
use reqwest::Url;
use rpc_toolkit::url::Host;
use rpc_toolkit::Context;
use serde::Deserialize;
@@ -83,6 +84,14 @@ impl RpcContext {
});
Ok(Self(seed))
}
pub async fn package_registry_url(&self) -> Result<Url, Error> {
Ok(crate::db::DatabaseModel::new()
.server_info()
.registry()
.get(&mut self.db.handle())
.await?
.to_owned())
}
}
impl Context for RpcContext {
fn host(&self) -> Host<&str> {