Skip to content

Commit

Permalink
add delete support
Browse files Browse the repository at this point in the history
  • Loading branch information
bshelton committed Apr 5, 2024
1 parent 3f748f6 commit b15346e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ enum MembersCommand {
Get(GetMember),
List(ListMembers),
Update(UpdateMember),
Delete(DeleteMember),
}

#[derive(StructOpt, Debug)]
Expand Down Expand Up @@ -355,6 +356,16 @@ struct UpdateMember {
active: bool,
}

#[derive(StructOpt, Debug)]
#[structopt(about = "Deletes a Member")]
struct DeleteMember {
#[structopt(long, short, parse(try_from_str = parse_member_id))]
id: MemberId,

#[structopt(long, short, parse(try_from_str = parse_org_id), default_value = "")]
org_id: OrgId,
}

#[derive(StructOpt, Debug)]
enum UserCommand {
List,
Expand Down Expand Up @@ -1985,6 +1996,11 @@ async fn call_api<'a, 'b>(
)
.await?;
}

MembersCommand::Delete(params) => {
let client = client_builder.create().await?;
esc_api::access::delete_member(&client, params.org_id, params.id).await?;
}
},
},

Expand Down

0 comments on commit b15346e

Please sign in to comment.