diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-10-27 22:16:46 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-10-27 22:16:46 -0400 |
commit | 5d0e308c1c57bea30d2ad9008b6dbc7936d58645 (patch) | |
tree | 3c3798d5fb826aeaca62e11d9e56e1e3b610ca2b /src/bin/rbw/commands.rs | |
parent | 7b95f7b9d84c44ca273c1a1ce7ab62925d4a5def (diff) | |
download | rbw-5d0e308c1c57bea30d2ad9008b6dbc7936d58645.tar.gz rbw-5d0e308c1c57bea30d2ad9008b6dbc7936d58645.zip |
add a separate "register" command to log in with api keys
Diffstat (limited to 'src/bin/rbw/commands.rs')
-rw-r--r-- | src/bin/rbw/commands.rs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/bin/rbw/commands.rs b/src/bin/rbw/commands.rs index dddd501..9efd966 100644 --- a/src/bin/rbw/commands.rs +++ b/src/bin/rbw/commands.rs @@ -465,16 +465,23 @@ pub fn config_unset(key: &str) -> anyhow::Result<()> { Ok(()) } -pub fn login(apikey: bool) -> anyhow::Result<()> { +pub fn register() -> anyhow::Result<()> { ensure_agent()?; - crate::actions::login(apikey)?; + crate::actions::register()?; + + Ok(()) +} + +pub fn login() -> anyhow::Result<()> { + ensure_agent()?; + crate::actions::login()?; Ok(()) } pub fn unlock() -> anyhow::Result<()> { ensure_agent()?; - crate::actions::login(false)?; + crate::actions::login()?; crate::actions::unlock()?; Ok(()) @@ -489,7 +496,7 @@ pub fn unlocked() -> anyhow::Result<()> { pub fn sync() -> anyhow::Result<()> { ensure_agent()?; - crate::actions::login(false)?; + crate::actions::login()?; crate::actions::sync()?; Ok(()) |