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)
| 116 | /// Returns [`TeamsError::PermissionDenied`](crate::error::TeamsError::PermissionDenied) |
| 117 | /// if the caller is not an owner. |
| 118 | pub async fn delete_org(client: &StorageClient, slug: &str) -> TeamsResult<()> { |
| 119 | debug!("Deleting organization: slug={slug}"); |
| 120 | let path = format!("/orgs/{slug}"); |
| 121 | client |
| 122 | .delete(&path) |
| 123 | .await |
| 124 | .map_err(|e| map_remote_error(e, format!("org {slug}")))?; |
| 125 | debug!("Deleted organization: slug={slug}"); |
| 126 | Ok(()) |
| 127 | } |
| 128 | |
| 129 | /// Upgrade an organization's plan. |
| 130 | /// |
no test coverage detected