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

Function delete

chirpstack/src/storage/device_keys.rs:78–90  ·  view source on GitHub ↗
(dev_eui: &EUI64)

Source from the content-addressed store, hash-verified

76}
77
78pub async fn delete(dev_eui: &EUI64) -> Result<(), Error> {
79 let ra = diesel::delete(device_keys::dsl::device_keys.find(&dev_eui))
80 .execute(&mut get_async_db_conn().await?)
81 .await?;
82 if ra == 0 {
83 return Err(Error::NotFound(dev_eui.to_string()));
84 }
85 info!(
86 dev_eui = %dev_eui,
87 "Device-keys deleted"
88 );
89 Ok(())
90}
91
92pub async fn set_dev_nonces(
93 dev_eui: EUI64,

Callers 1

test_device_keysFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_device_keysFunction · 0.56