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

Method edit_maintenance

kuma-client/src/client.rs:1035–1054  ·  view source on GitHub ↗
(self: &Arc<Self>, maintenance: &mut Maintenance)

Source from the content-addressed store, hash-verified

1033 }
1034
1035 pub async fn edit_maintenance(self: &Arc<Self>, maintenance: &mut Maintenance) -> Result<()> {
1036 let id = self
1037 .call(
1038 "addMaintenance",
1039 vec![serde_json::to_value(maintenance.clone()).unwrap()],
1040 "/maintenanceID",
1041 true,
1042 )
1043 .await?;
1044
1045 maintenance.common_mut().id = Some(id);
1046 if let Some(monitors) = &maintenance.common().monitors {
1047 self.set_maintenance_monitors(id, monitors).await?;
1048 }
1049 if let Some(status_pages) = &maintenance.common().status_pages {
1050 self.set_maintenance_status_pages(id, status_pages).await?;
1051 }
1052
1053 Ok(())
1054 }
1055
1056 pub async fn pause_maintenance(self: &Arc<Self>, maintenance_id: i32) -> Result<()> {
1057 let _: bool = self

Callers 1

handleFunction · 0.80

Calls 5

callMethod · 0.45
common_mutMethod · 0.45
commonMethod · 0.45

Tested by

no test coverage detected