use crate::framework::endpoint::{EndpointSpec, Method};
use crate::framework::response::ApiSuccess;
#[derive(Debug)]
pub struct DeleteDurableObject<'a> {
pub account_id: &'a str,
pub namespace_id: &'a str,
}
impl EndpointSpec for DeleteDurableObject<'_> {
type JsonResponse = ();
type ResponseType = ApiSuccess<Self::JsonResponse>;
fn method(&self) -> Method {
Method::DELETE
}
fn path(&self) -> String {
format!(
"accounts/{}/workers/durable_objects/namespaces/{}",
self.account_id, self.namespace_id
)
}
}