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

Function create_api_key

chirpstack/src/storage/api_key.rs:129–141  ·  view source on GitHub ↗
(is_admin: bool, is_tenant: bool)

Source from the content-addressed store, hash-verified

127 }
128
129 pub async fn create_api_key(is_admin: bool, is_tenant: bool) -> ApiKey {
130 let ak = ApiKey {
131 name: "test api key".into(),
132 is_admin,
133 tenant_id: match is_tenant {
134 false => None,
135 true => Some(tenant::test::create_tenant().await.id),
136 },
137 ..Default::default()
138 };
139
140 create(ak).await.unwrap()
141 }
142
143 #[tokio::test]
144 async fn api_key() {

Callers 12

api_keyFunction · 0.85
validate_active_userFunction · 0.85
validate_tenantFunction · 0.85
tenant_userFunction · 0.85
applicationFunction · 0.85
device_profileFunction · 0.85
deviceFunction · 0.85
device_queueFunction · 0.85
gatewayFunction · 0.85
multicast_groupFunction · 0.85
fuota_deploymentFunction · 0.85

Calls 4

create_tenantFunction · 0.85
unwrapMethod · 0.80
createFunction · 0.70
intoMethod · 0.45

Tested by

no test coverage detected