1
0
mirror of https://github.com/bitwarden/cli synced 2025-12-19 09:43:13 +00:00

Added --trash to delete cmd, added restore cmd

This commit is contained in:
Chad Scharf
2020-04-14 13:04:19 -04:00
parent 6e63a79cfd
commit 49f1fac3ed
8 changed files with 105 additions and 11 deletions

View File

@@ -70,6 +70,9 @@ export class EditCommand {
}
let cipherView = await cipher.decrypt();
if (cipherView.isDeleted) {
return Response.badRequest('You may not edit a deleted cipher. Use restore item <id> command first.');
}
cipherView = Cipher.toView(req, cipherView);
const encCipher = await this.cipherService.encrypt(cipherView);
try {