1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

throw error if trying to edit cipher with collection ids

This commit is contained in:
Kyle Spearrin
2018-10-19 09:15:42 -04:00
parent bf48b45010
commit b1ead78e34

View File

@@ -451,6 +451,9 @@ export class CipherService implements CipherServiceAbstraction {
} }
cipher.id = response.id; cipher.id = response.id;
} else { } else {
if (collectionIds != null) {
throw new Error('You cannot edit with collection ids.');
}
const request = new CipherRequest(cipher); const request = new CipherRequest(cipher);
response = await this.apiService.putCipher(cipher.id, request); response = await this.apiService.putCipher(cipher.id, request);
} }