melvin_ob/http_handler/http_request/
modify_objective_put.rs1use super::modify_objective;
2use super::request_common::{HTTPRequestMethod, HTTPRequestType, JSONBodyHTTPRequestType};
3use crate::http_handler::common::{BeaconObjective, ImageObjective};
4
5#[derive(serde::Serialize, Debug)]
7#[cfg(debug_assertions)]
8pub(crate) struct ModifyObjectiveRequest {
9 pub(crate) zoned_objectives: Vec<ImageObjective>,
11 pub(crate) beacon_objectives: Vec<BeaconObjective>,
13}
14
15impl JSONBodyHTTPRequestType for ModifyObjectiveRequest {
16 type Body = Self;
18 fn body(&self) -> &Self::Body { self }
20}
21
22impl HTTPRequestType for ModifyObjectiveRequest {
23 type Response = modify_objective::ModifyObjectiveResponse;
25 fn endpoint(&self) -> &'static str { "/objective" }
27 fn request_method(&self) -> HTTPRequestMethod { HTTPRequestMethod::Put }
29}