Delete a team. All team memberships and team-scoped grants are removed along with the team itself. The organization is selected by the client's org-scoped base URL/subdomain.
(
client: &StorageClient,
org_slug: &str,
team_slug: &str,
)
| 101 | /// team itself. The organization is selected by the client's org-scoped base |
| 102 | /// URL/subdomain. |
| 103 | pub async fn delete_team( |
| 104 | client: &StorageClient, |
| 105 | org_slug: &str, |
| 106 | team_slug: &str, |
| 107 | ) -> TeamsResult<()> { |
| 108 | debug_assert_eq!(client.org_slug(), org_slug); |
| 109 | let path = format!("/teams/{team_slug}"); |
| 110 | client |
| 111 | .delete(&path) |
| 112 | .await |
| 113 | .map_err(|e| map_remote_error(e, format!("team {team_slug}"))) |
| 114 | } |
| 115 | |
| 116 | // --------------------------------------------------------------------------- |
| 117 | // Tests |
no test coverage detected