summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat-cli/src/main.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/fatcat-cli/src/main.rs b/fatcat-cli/src/main.rs
index b3a5db3..055ac41 100644
--- a/fatcat-cli/src/main.rs
+++ b/fatcat-cli/src/main.rs
@@ -55,7 +55,7 @@ struct Opt {
}
#[derive(StructOpt)]
-enum EditgroupCommand {
+enum EditgroupsCommand {
/// Create a new editgroup
Create {
#[structopt(long, short)]
@@ -246,9 +246,9 @@ enum Command {
#[structopt(long = "--index-json")]
index_json: bool,
},
- Editgroup {
+ Editgroups {
#[structopt(subcommand)]
- cmd: EditgroupCommand,
+ cmd: EditgroupsCommand,
},
Changelog {
#[structopt(long, short = "-n", default_value = "20")]
@@ -596,9 +596,9 @@ fn run(opt: Opt) -> Result<()> {
let history_entries = specifier.get_history(&mut api_client, Some(limit))?;
print_entity_histories(history_entries, json)?;
}
- Command::Editgroup {
+ Command::Editgroups {
cmd:
- EditgroupCommand::List {
+ EditgroupsCommand::List {
editor_id,
limit,
json,
@@ -628,8 +628,8 @@ fn run(opt: Opt) -> Result<()> {
}
}
}
- Command::Editgroup {
- cmd: EditgroupCommand::Reviewable { limit, json },
+ Command::Editgroups {
+ cmd: EditgroupsCommand::Reviewable { limit, json },
} => {
let result = api_client
.rt
@@ -650,26 +650,26 @@ fn run(opt: Opt) -> Result<()> {
}
}
}
- Command::Editgroup {
- cmd: EditgroupCommand::Create { description },
+ Command::Editgroups {
+ cmd: EditgroupsCommand::Create { description },
} => {
let eg = api_client.create_editgroup(Some(description))?;
writeln!(&mut std::io::stdout(), "{}", to_colored_json_auto(&serde_json::to_value(&eg)?)?)?
}
- Command::Editgroup {
- cmd: EditgroupCommand::Accept { editgroup_id },
+ Command::Editgroups {
+ cmd: EditgroupsCommand::Accept { editgroup_id },
} => {
let msg = api_client.accept_editgroup(editgroup_id.clone())?;
writeln!(&mut std::io::stdout(), "{}", to_colored_json_auto(&serde_json::to_value(&msg)?)?)?
}
- Command::Editgroup {
- cmd: EditgroupCommand::Submit { editgroup_id },
+ Command::Editgroups {
+ cmd: EditgroupsCommand::Submit { editgroup_id },
} => {
let msg = api_client.update_editgroup_submit(editgroup_id, true)?;
writeln!(&mut std::io::stdout(), "{}", to_colored_json_auto(&serde_json::to_value(&msg)?)?)?
}
- Command::Editgroup {
- cmd: EditgroupCommand::Unsubmit { editgroup_id },
+ Command::Editgroups {
+ cmd: EditgroupsCommand::Unsubmit { editgroup_id },
} => {
let msg = api_client.update_editgroup_submit(editgroup_id, false)?;
writeln!(&mut std::io::stdout(), "{}", to_colored_json_auto(&serde_json::to_value(&msg)?)?)?