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

Function delete_org

atomic-teams/src/org.rs:97–106  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

95/// Returns [`TeamsError::PermissionDenied`](crate::error::TeamsError::PermissionDenied)
96/// if the caller is not an owner.
97pub 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///

Callers 1

executeMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected