Update a team's metadata. Only the fields that are `Some` are sent to the server — omitted fields remain unchanged. The organization is selected by the client's org-scoped base URL/subdomain, so identical team slugs in different orgs remain distinct.
(
client: &StorageClient,
org_slug: &str,
team_slug: &str,
name: Option<&str>,
description: Option<&str>,
visibility: Option<TeamVisibility>,
)
| 75 | /// base URL/subdomain, so identical team slugs in different orgs remain |
| 76 | /// distinct. |
| 77 | pub async fn update_team( |
| 78 | client: &StorageClient, |
| 79 | org_slug: &str, |
| 80 | team_slug: &str, |
| 81 | name: Option<&str>, |
| 82 | description: Option<&str>, |
| 83 | visibility: Option<TeamVisibility>, |
| 84 | ) -> TeamsResult<TeamInfo> { |
| 85 | debug_assert_eq!(client.org_slug(), org_slug); |
| 86 | let path = format!("/teams/{team_slug}"); |
| 87 | let body = UpdateTeamRequest { |
| 88 | name, |
| 89 | description, |
| 90 | visibility, |
| 91 | }; |
| 92 | client |
| 93 | .put(&path, &body) |
| 94 | .await |
| 95 | .map_err(|e| map_remote_error(e, format!("team {team_slug}"))) |
| 96 | } |
| 97 | |
| 98 | /// Delete a team. |
| 99 | /// |
no test coverage detected