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

Function delete_org

atomic-teams/src/org.rs:118–127  ·  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

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

Callers 1

executeMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected