reconcile types

This commit is contained in:
Aiden McClelland
2021-08-05 11:23:20 -06:00
committed by Aiden McClelland
parent a272d5d698
commit a1f1dc2ce7
11 changed files with 449 additions and 193 deletions

View File

@@ -99,12 +99,24 @@ 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(), false)
.await?
.to_owned())
Ok(
if let Some(market) = crate::db::DatabaseModel::new()
.server_info()
.package_marketplace()
.get(&mut self.db.handle(), false)
.await?
.to_owned()
{
market
} else {
crate::db::DatabaseModel::new()
.server_info()
.eos_marketplace()
.get(&mut self.db.handle(), false)
.await?
.to_owned()
},
)
}
}
impl Context for RpcContext {