Revoke (delete) a domain alias from an organization. # Errors Returns [`TeamsError::OrgNotFound`] if the organization or domain does not exist, [`TeamsError::PermissionDenied`] if the caller is not an org admin or owner, or [`TeamsError::Remote`] on transport failure. [`TeamsError::OrgNotFound`]: crate::error::TeamsError::OrgNotFound [`TeamsError::PermissionDenied`]: crate::error::TeamsError::P
(
client: &StorageClient,
org_slug: &str,
domain_id: Uuid,
)
| 93 | /// [`TeamsError::PermissionDenied`]: crate::error::TeamsError::PermissionDenied |
| 94 | /// [`TeamsError::Remote`]: crate::error::TeamsError::Remote |
| 95 | pub async fn revoke_domain( |
| 96 | client: &StorageClient, |
| 97 | org_slug: &str, |
| 98 | domain_id: Uuid, |
| 99 | ) -> TeamsResult<()> { |
| 100 | let path = format!("/orgs/{org_slug}/domains/{domain_id}"); |
| 101 | client |
| 102 | .delete(&path) |
| 103 | .await |
| 104 | .map_err(|e| map_remote_error(e, format!("org {org_slug}"))) |
| 105 | } |
| 106 | |
| 107 | #[cfg(test)] |
| 108 | mod tests { |
nothing calls this directly
no test coverage detected