Delete an organization. This is a destructive operation. The caller must be an owner of the organization. # Errors Returns [`TeamsError::PermissionDenied`](crate::error::TeamsError::PermissionDenied) if the caller is not an owner.
(client: &StorageClient, slug: &str)
| 95 | /// Returns [`TeamsError::PermissionDenied`](crate::error::TeamsError::PermissionDenied) |
| 96 | /// if the caller is not an owner. |
| 97 | pub async fn delete_org(client: &StorageClient, slug: &str) -> TeamsResult<()> { |
| 98 | debug!("Deleting organization: slug={slug}"); |
| 99 | let path = format!("/orgs/{slug}"); |
| 100 | client |
| 101 | .delete(&path) |
| 102 | .await |
| 103 | .map_err(|e| map_remote_error(e, format!("org {slug}")))?; |
| 104 | debug!("Deleted organization: slug={slug}"); |
| 105 | Ok(()) |
| 106 | } |
| 107 | |
| 108 | /// Upgrade an organization's plan. |
| 109 | /// |
no test coverage detected