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

Method delete_api_key

chirpstack/src/api/internal.rs:351–367  ·  view source on GitHub ↗
(
        &self,
        request: Request<api::DeleteApiKeyRequest>,
    )

Source from the content-addressed store, hash-verified

349 }
350
351 async fn delete_api_key(
352 &self,
353 request: Request<api::DeleteApiKeyRequest>,
354 ) -> Result<Response<()>, Status> {
355 let req = request.get_ref();
356 let api_key_id = Uuid::from_str(&req.id).map_err(|e| e.status())?;
357
358 self.validator
359 .validate(
360 request.extensions(),
361 validator::ValidateApiKeyAccess::new(validator::Flag::Delete, api_key_id),
362 )
363 .await?;
364
365 api_key::delete(&api_key_id).await.map_err(|e| e.status())?;
366 Ok(Response::new(()))
367 }
368
369 async fn list_api_keys(
370 &self,

Callers

nothing calls this directly

Calls 3

statusMethod · 0.80
deleteFunction · 0.50
validateMethod · 0.45

Tested by

no test coverage detected