miscellaneous bugfixes (#2597)

* miscellaneous bugfixes

* misc fixes
This commit is contained in:
Aiden McClelland
2024-04-09 15:10:26 -06:00
committed by GitHub
parent c13d8f3699
commit aee5500833
12 changed files with 50 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
use clap::Parser;
use imbl_value::Value;
use imbl_value::{json, Value};
use models::PackageId;
use rpc_toolkit::command;
use serde::{Deserialize, Serialize};
@@ -24,7 +24,10 @@ pub async fn properties(
PropertiesParam { id }: PropertiesParam,
) -> Result<Value, Error> {
match &*ctx.services.get(&id).await {
Some(service) => service.properties().await,
Some(service) => Ok(json!({
"version": 2,
"data": service.properties().await?
})),
None => Err(Error::new(
eyre!("Could not find a service with id {id}"),
ErrorKind::NotFound,