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

Function delete

chirpstack/src/storage/api_key.rs:65–74  ·  view source on GitHub ↗
(id: &Uuid)

Source from the content-addressed store, hash-verified

63}
64
65pub async fn delete(id: &Uuid) -> Result<(), Error> {
66 let ra = diesel::delete(api_key::dsl::api_key.find(fields::Uuid::from(id)))
67 .execute(&mut get_async_db_conn().await?)
68 .await?;
69 if ra == 0 {
70 return Err(Error::NotFound(id.to_string()));
71 }
72 info!(id = %id, "Api-key deleted");
73 Ok(())
74}
75
76pub async fn get_count(filters: &Filters) -> Result<i64, Error> {
77 let mut q = api_key::dsl::api_key

Callers 1

api_keyFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by

no test coverage detected