summaryrefslogtreecommitdiffstats
path: root/adenosine-cli/src/bin
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-10 19:32:20 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-11-10 19:32:20 -0800
commitfee3905a4c175200fcc1c62959c6cdbe3c3d5b5e (patch)
tree2c9f7faf75f57838562e146167f94387af6b70fc /adenosine-cli/src/bin
parentf9ca910036cf9020c9fc36b57194d285a0396f9d (diff)
downloadadenosine-fee3905a4c175200fcc1c62959c6cdbe3c3d5b5e.tar.gz
adenosine-fee3905a4c175200fcc1c62959c6cdbe3c3d5b5e.zip
cli: u/username on CLI; allow sending invite code
Diffstat (limited to 'adenosine-cli/src/bin')
-rw-r--r--adenosine-cli/src/bin/adenosine.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/adenosine-cli/src/bin/adenosine.rs b/adenosine-cli/src/bin/adenosine.rs
index f593b11..6873a8b 100644
--- a/adenosine-cli/src/bin/adenosine.rs
+++ b/adenosine-cli/src/bin/adenosine.rs
@@ -61,7 +61,7 @@ enum AccountCommand {
#[structopt(long, short)]
email: String,
- #[structopt(long, short)]
+ #[structopt(long = "--username", short = "-u")]
handle: String,
#[structopt(long, short)]
@@ -69,6 +69,9 @@ enum AccountCommand {
#[structopt(long, short)]
recovery_key: Option<String>,
+
+ #[structopt(long, short)]
+ invite_code: Option<String>,
},
/// Delete the currently logged-in account (danger!)
Delete,
@@ -77,7 +80,7 @@ enum AccountCommand {
/// This will return a JWT token that you should assign to the `ATP_AUTH_TOKEN` environment
/// variable
Login {
- #[structopt(long, short)]
+ #[structopt(long = "--username", short = "-u")]
handle: String,
#[structopt(long, short)]
@@ -433,6 +436,7 @@ fn run(opt: Opt) -> Result<()> {
handle,
password,
recovery_key,
+ invite_code,
},
} => {
let mut body = json!({
@@ -443,6 +447,9 @@ fn run(opt: Opt) -> Result<()> {
if let Some(key) = recovery_key {
body["recoveryKey"] = json!(key);
}
+ if let Some(code) = invite_code {
+ body["inviteCode"] = json!(code);
+ }
xrpc_client.post(
&Nsid::from_str("com.atproto.account.create")?,
None,