Fetch an organization by slug. # Errors Returns [`TeamsError::OrgNotFound`](crate::error::TeamsError::OrgNotFound) if the slug does not match any organization visible to the caller.
(client: &StorageClient, slug: &str)
| 49 | /// Returns [`TeamsError::OrgNotFound`](crate::error::TeamsError::OrgNotFound) |
| 50 | /// if the slug does not match any organization visible to the caller. |
| 51 | pub async fn get_org(client: &StorageClient, slug: &str) -> TeamsResult<OrgInfo> { |
| 52 | debug!("Fetching organization: slug={slug}"); |
| 53 | let path = format!("/orgs/{slug}"); |
| 54 | let info: OrgInfo = client |
| 55 | .get(&path) |
| 56 | .await |
| 57 | .map_err(|e| map_remote_error(e, format!("org {slug}")))?; |
| 58 | Ok(info) |
| 59 | } |
| 60 | |
| 61 | /// Update an existing organization. |
| 62 | /// |
no test coverage detected