List every organization the caller belongs to, with the caller's role. This hits the apex `GET /orgs` endpoint, so `client` must target the server apex (the bare host), not an org subdomain. Use `atomic_cli::commands::client::build_apex_client` to build such a client. # Errors Returns a `TeamsError` derived from the remote response on any failure (e.g. `TeamsError::PermissionDenied` if the call
(client: &StorageClient)
| 71 | /// Returns a `TeamsError` derived from the remote response on any failure |
| 72 | /// (e.g. `TeamsError::PermissionDenied` if the caller's token is rejected). |
| 73 | pub async fn list_my_orgs(client: &StorageClient) -> TeamsResult<Vec<MyOrgInfo>> { |
| 74 | debug!("Listing organizations the caller belongs to"); |
| 75 | let infos: Vec<MyOrgInfo> = client |
| 76 | .get("/orgs") |
| 77 | .await |
| 78 | .map_err(|e| map_remote_error(e, "list my orgs".to_string()))?; |
| 79 | Ok(infos) |
| 80 | } |
| 81 | |
| 82 | /// Update an existing organization. |
| 83 | /// |
no test coverage detected