melvin_ob/http_handler/http_request/
delete_objective_delete.rs1use super::delete_objective;
2use super::request_common::{HTTPRequestMethod, HTTPRequestType, NoBodyHTTPRequestType};
3use std::collections::HashMap;
4
5#[derive(Debug)]
7#[cfg(debug_assertions)]
8pub(crate) struct DeleteObjectiveRequest {
9 id: usize,
11}
12
13impl NoBodyHTTPRequestType for DeleteObjectiveRequest {}
14
15impl HTTPRequestType for DeleteObjectiveRequest {
16 type Response = delete_objective::DeleteObjectiveResponse;
18 fn endpoint(&self) -> &'static str { "/objective" }
20 fn request_method(&self) -> HTTPRequestMethod { HTTPRequestMethod::Delete }
22 fn query_params(&self) -> HashMap<&str, String> {
24 let mut query = HashMap::new();
25 query.insert("id", self.id.to_string());
26 query
27 }
28}