Update the role of an existing organization member. # Arguments `client` — Authenticated storage client. `org_slug` — URL-safe slug of the organization. `identity_id` — Identity of the member to update. `role` — New role to assign.
(
client: &StorageClient,
org_slug: &str,
identity_id: Uuid,
role: OrgRole,
)
| 79 | /// * `identity_id` — Identity of the member to update. |
| 80 | /// * `role` — New role to assign. |
| 81 | pub async fn update_member_role( |
| 82 | client: &StorageClient, |
| 83 | org_slug: &str, |
| 84 | identity_id: Uuid, |
| 85 | role: OrgRole, |
| 86 | ) -> TeamsResult<OrgMemberInfo> { |
| 87 | let path = format!("/orgs/{org_slug}/members/{identity_id}"); |
| 88 | let body = UpdateMemberRoleRequest { role }; |
| 89 | client.put(&path, &body).await.map_err(|e| { |
| 90 | map_remote_error( |
| 91 | e, |
| 92 | format!("member identity {identity_id} in org {org_slug}"), |
| 93 | ) |
| 94 | }) |
| 95 | } |
| 96 | |
| 97 | /// Remove a member from an organization. |
| 98 | /// |
no test coverage detected