🔨 Refactors sync to use bw instead of rbw
This commit is contained in:
+5
-5
@@ -75,18 +75,18 @@ pub fn check_pass() -> Result<(), Error> {
|
||||
));
|
||||
}
|
||||
|
||||
return Ok(());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn get_vaults() -> Result<Vaults, Error> {
|
||||
let vaults_raw = sh::sh(format!("{} vault list --output json", EXECUTABLE));
|
||||
return match serde_json::from_str(vaults_raw.as_str()) {
|
||||
match serde_json::from_str(vaults_raw.as_str()) {
|
||||
Ok(val) => Ok(val),
|
||||
Err(e) => Err(Error::new(
|
||||
ErrorKind::Other,
|
||||
format!("Couldn't get vaults: {e}"),
|
||||
)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_items(vault: &String) -> Result<Items, Error> {
|
||||
@@ -94,13 +94,13 @@ pub fn get_items(vault: &String) -> Result<Items, Error> {
|
||||
"{} item list '{}' --output json --show-secrets",
|
||||
EXECUTABLE, vault
|
||||
));
|
||||
return match serde_json::from_str(items_raw.as_str()) {
|
||||
match serde_json::from_str(items_raw.as_str()) {
|
||||
Ok(val) => Ok(val),
|
||||
Err(e) => Err(Error::new(
|
||||
ErrorKind::Other,
|
||||
format!("Couldn't get items: {e}"),
|
||||
)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_logins(items: Items) -> Vec<LoginItem> {
|
||||
|
||||
Reference in New Issue
Block a user