diff --git a/src/api/reset.rs b/src/api/reset.rs index 2935a8f..50a60c0 100644 --- a/src/api/reset.rs +++ b/src/api/reset.rs @@ -24,12 +24,12 @@ fn get_reset_options(server_number: ServerId) -> UnauthenticatedRequest Result, serde_html_form::ser::Error> { +) -> Result>, serde_html_form::ser::Error> { UnauthenticatedRequest::from(&format!( "https://robot-ws.your-server.de/reset/{server_number}" )) .with_method("POST") - .with_body(ExecutedReset { reset }) + .with_body(ExecuteReset { reset }) } impl AsyncRobot { @@ -85,12 +85,12 @@ impl AsyncRobot { server_number: ServerId, reset: Reset, ) -> Result { - Ok(self.go(trigger_reset(server_number, reset)?).await?.reset) + Ok(self.go(trigger_reset(server_number, reset)?).await?.0.reset) } } #[derive(Serialize, Deserialize)] -struct ExecutedReset { +struct ExecuteReset { #[serde(rename = "type")] reset: Reset, }