mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
fix lock ordering
This commit is contained in:
committed by
Aiden McClelland
parent
8c1016b3eb
commit
d3ab3cb46b
@@ -24,12 +24,12 @@ pub async fn set_eos_url(#[context] ctx: RpcContext, #[arg] url: Url) -> Result<
|
|||||||
pub async fn set_package_url(#[context] ctx: RpcContext, #[arg] url: Url) -> Result<(), Error> {
|
pub async fn set_package_url(#[context] ctx: RpcContext, #[arg] url: Url) -> Result<(), Error> {
|
||||||
let mut db = ctx.db.handle();
|
let mut db = ctx.db.handle();
|
||||||
let mut tx = db.begin().await?;
|
let mut tx = db.begin().await?;
|
||||||
|
ctx.set_nginx_conf(&mut tx).await?;
|
||||||
crate::db::DatabaseModel::new()
|
crate::db::DatabaseModel::new()
|
||||||
.server_info()
|
.server_info()
|
||||||
.package_marketplace()
|
.package_marketplace()
|
||||||
.put(&mut tx, &Some(url))
|
.put(&mut tx, &Some(url))
|
||||||
.await?;
|
.await?;
|
||||||
ctx.set_nginx_conf(&mut tx).await?;
|
|
||||||
tx.commit(None).await?;
|
tx.commit(None).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user