Browse Source

implemented editCredential method

feature-credential
fdai6352 3 years ago
parent
commit
edc5aa577d
  1. 10
      src/main/java/Vault.java

10
src/main/java/Vault.java

@ -110,6 +110,14 @@ public class Vault implements VaultInterface {
} }
} }
public void editCredential(int newID, String newString, boolean decision) {
if(decision == true){
credentialRepository.updateUsername(newID, newString);
} else {
credentialRepository.updatePassword(newID, newString);
}
}
public void getAsJson(){ public void getAsJson(){
@ -201,7 +209,7 @@ public class Vault implements VaultInterface {
} }
println("Type new:"); println("Type new:");
newString = scan.nextLine(); newString = scan.nextLine();
//editCredential(newID, newString, decision);
editCredential(newID, newString, decision);
break; break;
} }
} }

Loading…
Cancel
Save