use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::ApiResult;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
pub struct DeleteScript<'a> {
pub account_id: &'a str,
pub script_name: &'a str,
}
impl<'a> EndpointSpec<ScriptDeleteID> for DeleteScript<'a> {
fn method(&self) -> Method {
Method::DELETE
}
fn path(&self) -> String {
format!(
"accounts/{}/workers/scripts/{}",
self.account_id, self.script_name
)
}
}
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
pub struct ScriptDeleteID {
pub id: String,
}
impl ApiResult for ScriptDeleteID {}