From b6a162cc27af862f2453c48b92a19ed6986b0445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Oliveirinha?= Date: Tue, 6 Dec 2022 15:19:07 +0000 Subject: [PATCH] Add support delete tunnel with connections (#194) --- cloudflare/src/endpoints/argo_tunnel/delete_tunnel.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cloudflare/src/endpoints/argo_tunnel/delete_tunnel.rs b/cloudflare/src/endpoints/argo_tunnel/delete_tunnel.rs index 40149665..7cef7161 100644 --- a/cloudflare/src/endpoints/argo_tunnel/delete_tunnel.rs +++ b/cloudflare/src/endpoints/argo_tunnel/delete_tunnel.rs @@ -8,6 +8,8 @@ use super::Tunnel; pub struct DeleteTunnel<'a> { pub account_identifier: &'a str, pub tunnel_id: &'a str, + // should delete tunnel connections if any exists + pub cascade: bool, } impl<'a> Endpoint for DeleteTunnel<'a> { @@ -16,8 +18,8 @@ impl<'a> Endpoint for DeleteTunnel<'a> { } fn path(&self) -> String { format!( - "accounts/{}/tunnels/{}", - self.account_identifier, self.tunnel_id + "accounts/{}/tunnels/{}?cascade={}", + self.account_identifier, self.tunnel_id, self.cascade ) } }