cloudflare_but_works/endpoints/workers/
delete_do.rs1use crate::framework::endpoint::{EndpointSpec, Method};
2use crate::framework::response::ApiSuccess;
3
4#[derive(Debug)]
6pub struct DeleteDurableObject<'a> {
7 pub account_id: &'a str,
9 pub namespace_id: &'a str,
11}
12
13impl EndpointSpec for DeleteDurableObject<'_> {
14 type JsonResponse = ();
15 type ResponseType = ApiSuccess<Self::JsonResponse>;
16
17 fn method(&self) -> Method {
18 Method::DELETE
19 }
20
21 fn path(&self) -> String {
22 format!(
23 "accounts/{}/workers/durable_objects/namespaces/{}",
24 self.account_id, self.namespace_id
25 )
26 }
27}