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

Function update_team

atomic-teams/src/team.rs:77–96  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

75/// base URL/subdomain, so identical team slugs in different orgs remain
76/// distinct.
77pub 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///

Callers 1

executeMethod · 0.85

Calls 2

map_remote_errorFunction · 0.85
putMethod · 0.80

Tested by

no test coverage detected