MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / delete

Method delete

chirpstack/src/api/application.rs:138–159  ·  view source on GitHub ↗
(
        &self,
        request: Request<api::DeleteApplicationRequest>,
    )

Source from the content-addressed store, hash-verified

136 }
137
138 async fn delete(
139 &self,
140 request: Request<api::DeleteApplicationRequest>,
141 ) -> Result<Response<()>, Status> {
142 let req = request.get_ref();
143 let app_id = Uuid::from_str(&req.id).map_err(|e| e.status())?;
144
145 self.validator
146 .validate(
147 request.extensions(),
148 validator::ValidateApplicationAccess::new(validator::Flag::Delete, app_id),
149 )
150 .await?;
151
152 application::delete(&app_id).await.map_err(|e| e.status())?;
153
154 let mut resp = Response::new(());
155 resp.metadata_mut()
156 .insert("x-log-application_id", req.id.parse().unwrap());
157
158 Ok(resp)
159 }
160
161 async fn list(
162 &self,

Callers 1

test_applicationFunction · 0.45

Calls 5

statusMethod · 0.80
insertMethod · 0.80
unwrapMethod · 0.80
deleteFunction · 0.50
validateMethod · 0.45

Tested by 1

test_applicationFunction · 0.36