mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user