Skip to content

Commit e578b25

Browse files
fredrik-jansson-seFredrik Jansson
and
Fredrik Jansson
authored
chore: Set default_tenant if wildcard tenant is returned (#22)
Co-authored-by: Fredrik Jansson <[email protected]>
1 parent a3b7a76 commit e578b25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/api.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ impl APIClientAsync {
115115
let client = Client::new();
116116
let request = client.request(Method::GET, url);
117117
let resp = Self::send_request_no_self(request, auth, None).await?;
118-
let user_identity: UserIdentity = resp.json().await?;
118+
let mut user_identity: UserIdentity = resp.json().await?;
119+
if &user_identity.tenant == "*" {
120+
user_identity.tenant = "default_tenant".to_string();
121+
}
119122
Ok(user_identity)
120123
}
121124

0 commit comments

Comments
 (0)