mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
update breakage response type (#642)
This commit is contained in:
@@ -230,10 +230,7 @@ pub async fn set_dry(
|
||||
.configured()
|
||||
.put(&mut tx, &true)
|
||||
.await?;
|
||||
Ok(BreakageRes {
|
||||
patch: tx.abort().await?,
|
||||
breakages,
|
||||
})
|
||||
Ok(BreakageRes(breakages))
|
||||
}
|
||||
|
||||
pub async fn set_impl(
|
||||
|
||||
@@ -111,10 +111,7 @@ pub async fn stop_dry(
|
||||
let mut breakages = BTreeMap::new();
|
||||
stop_common(&mut tx, &id, &mut breakages).await?;
|
||||
|
||||
Ok(BreakageRes {
|
||||
breakages,
|
||||
patch: tx.abort().await?,
|
||||
})
|
||||
Ok(BreakageRes(breakages))
|
||||
}
|
||||
|
||||
pub async fn stop_impl(ctx: RpcContext, id: PackageId) -> Result<WithRevision<()>, Error> {
|
||||
|
||||
@@ -323,10 +323,7 @@ pub struct TaggedDependencyError {
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub struct BreakageRes {
|
||||
pub patch: DiffPatch,
|
||||
pub breakages: BTreeMap<PackageId, TaggedDependencyError>,
|
||||
}
|
||||
pub struct BreakageRes(pub BTreeMap<PackageId, TaggedDependencyError>);
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
pub struct Dependencies(pub BTreeMap<PackageId, DepInfo>);
|
||||
|
||||
@@ -142,10 +142,7 @@ pub async fn uninstall_dry(
|
||||
break_all_dependents_transitive(&mut tx, &id, DependencyError::NotInstalled, &mut breakages)
|
||||
.await?;
|
||||
|
||||
Ok(BreakageRes {
|
||||
breakages,
|
||||
patch: tx.abort().await?,
|
||||
})
|
||||
Ok(BreakageRes(breakages))
|
||||
}
|
||||
|
||||
pub async fn uninstall_impl(ctx: RpcContext, id: PackageId) -> Result<WithRevision<()>, Error> {
|
||||
|
||||
Reference in New Issue
Block a user