(self: &Arc<Self>, maintenance: &mut Maintenance)
| 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 |
no test coverage detected