Skip to content

Commit

Permalink
Add support delete tunnel with connections (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
joliveirinha authored Dec 6, 2022
1 parent 715c012 commit b6a162c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cloudflare/src/endpoints/argo_tunnel/delete_tunnel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Tunnel> for DeleteTunnel<'a> {
Expand All @@ -16,8 +18,8 @@ impl<'a> Endpoint<Tunnel> 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
)
}
}

0 comments on commit b6a162c

Please sign in to comment.