MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / revoke_domain

Function revoke_domain

atomic-teams/src/domain.rs:95–105  ·  view source on GitHub ↗

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,
)

Source from the content-addressed store, hash-verified

93/// [`TeamsError::PermissionDenied`]: crate::error::TeamsError::PermissionDenied
94/// [`TeamsError::Remote`]: crate::error::TeamsError::Remote
95pub 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)]
108mod tests {

Callers

nothing calls this directly

Calls 2

map_remote_errorFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected