~nicohman/raven

4ea16f9c7b1adcbb5966aa61d4c8418acffae484 — nicohman 1 year, 7 months ago 15673e9 master
Move delete user's password intto a seperate prompt
2 files changed, 8 insertions(+), 2 deletions(-)

M src/args.rs
M src/main.rs
M src/args.rs => src/args.rs +1 -1
@@ 67,7 67,7 @@ pub enum Manage {
        name = "delete_user",
        about = "Delete an online user's profile and owned themes"
    )]
    DUser { pass: String },
    DUser,
    #[structopt(name = "logout", about = "Log out of your user profile")]
    Logout,
    #[structopt(name = "unpublish", about = "Delete an online theme")]

M src/main.rs => src/main.rs +7 -1
@@ 81,7 81,13 @@ fn interpet_args() {
                    login_user(name, pass).unwrap();
                }
                ManageO(Logout) => logout().unwrap(),
                ManageO(DUser { pass }) => delete_user(pass).unwrap(),
                ManageO(DUser) => {
                    let pass: String = PasswordInput::new()
                        .with_prompt("Password")
                        .interact()
                        .unwrap();
                    delete_user(pass).unwrap()
                }
                _ => println!("Well, this shouldn't be happening"),
            };
        }