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

save share response

This commit is contained in:
Kyle Spearrin
2018-10-23 16:16:59 -04:00
parent 2f510a7988
commit 43c0cbce45
3 changed files with 7 additions and 5 deletions

View File

@@ -465,9 +465,10 @@ export class CipherService implements CipherServiceAbstraction {
cipher.collectionIds = collectionIds;
const encCipher = await this.encrypt(cipher);
const request = new CipherShareRequest(encCipher);
await this.apiService.putShareCipher(cipher.id, request);
const response = await this.apiService.putShareCipher(cipher.id, request);
const userId = await this.userService.getUserId();
await this.upsert(encCipher.toCipherData(userId));
const data = new CipherData(response, userId, collectionIds);
await this.upsert(data);
}
async shareManyWithServer(ciphers: CipherView[], organizationId: string, collectionIds: string[]): Promise<any> {