MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / edit_status_page

Method edit_status_page

kuma-client/src/client.rs:1165–1187  ·  view source on GitHub ↗
(self: &Arc<Self>, status_page: &mut StatusPage)

Source from the content-addressed store, hash-verified

1163 }
1164
1165 pub async fn edit_status_page(self: &Arc<Self>, status_page: &mut StatusPage) -> Result<()> {
1166 let mut config = serde_json::to_value(status_page.clone()).unwrap();
1167 config
1168 .as_object_mut()
1169 .unwrap()
1170 .insert("logo".to_owned(), status_page.icon.clone().into());
1171
1172 let _: bool = self
1173 .call(
1174 "saveStatusPage",
1175 vec![
1176 serde_json::to_value(status_page.slug.clone()).unwrap(),
1177 serde_json::to_value(config).unwrap(),
1178 serde_json::to_value(status_page.icon.clone()).unwrap(),
1179 serde_json::to_value(status_page.public_group_list.clone()).unwrap(),
1180 ],
1181 "/ok",
1182 true,
1183 )
1184 .await?;
1185
1186 Ok(())
1187 }
1188
1189 pub async fn add_docker_host(self: &Arc<Self>, docker_host: &mut DockerHost) -> Result<()> {
1190 self.edit_docker_host(docker_host).await

Callers 2

add_status_pageMethod · 0.80
handleFunction · 0.80

Calls 1

callMethod · 0.45

Tested by

no test coverage detected