tuwunel_api/client/rendezvous/
delete.rs1use axum::{
2 extract::{Path, State},
3 response::{IntoResponse, Response},
4};
5use http::StatusCode;
6use tuwunel_core::{Result, err};
7
8use super::ensure_enabled;
9
10#[tracing::instrument(level = "debug", skip_all)]
11pub(crate) async fn delete_rendezvous_route(
12 State(services): State<crate::State>,
13 Path(id): Path<String>,
14) -> Result<Response> {
15 ensure_enabled(&services)?;
16
17 services
18 .rendezvous
19 .delete(&id)
20 .then(|| StatusCode::NO_CONTENT.into_response())
21 .ok_or_else(|| err!(Request(NotFound("Rendezvous session not found"))))
22}