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

Function get

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

Source from the content-addressed store, hash-verified

119 }
120
121 pub async fn get(id: &Uuid) -> Result<ApiKey, Error> {
122 api_key::dsl::api_key
123 .find(fields::Uuid::from(id))
124 .first(&mut get_async_db_conn().await?)
125 .await
126 .map_err(|e| error::Error::from_diesel(e, id.to_string()))
127 }
128
129 pub async fn create_api_key(is_admin: bool, is_tenant: bool) -> ApiKey {
130 let ak = ApiKey {

Callers 1

api_keyFunction · 0.70

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by

no test coverage detected