misc fixes

This commit is contained in:
Aiden McClelland
2021-10-08 16:45:13 -06:00
committed by Aiden McClelland
parent ab6c14afb7
commit f4b70f653f
4 changed files with 249 additions and 127 deletions

View File

@@ -214,21 +214,24 @@ impl RpcContext {
if let Some(market) = crate::db::DatabaseModel::new()
.server_info()
.package_marketplace()
.get(&mut self.db.handle(), false)
.get(&mut self.db.handle(), true)
.await?
.to_owned()
{
market
} else {
crate::db::DatabaseModel::new()
.server_info()
.eos_marketplace()
.get(&mut self.db.handle(), false)
.await?
.to_owned()
self.eos_registry_url().await?
},
)
}
pub async fn eos_registry_url(&self) -> Result<Url, Error> {
Ok(crate::db::DatabaseModel::new()
.server_info()
.eos_marketplace()
.get(&mut self.db.handle(), true)
.await?
.to_owned())
}
}
impl Context for RpcContext {
fn host(&self) -> Host<&str> {