[AC-2330] Updated Cipher Collections Now Sets Readonly Properly (#8549)
Update putCipherCollection call to get new cipher with updated edit value
This commit is contained in:
parent
44d59f0d8c
commit
c701ad9cf2
|
@ -220,7 +220,7 @@ export abstract class ApiService {
|
|||
putMoveCiphers: (request: CipherBulkMoveRequest) => Promise<any>;
|
||||
putShareCipher: (id: string, request: CipherShareRequest) => Promise<CipherResponse>;
|
||||
putShareCiphers: (request: CipherBulkShareRequest) => Promise<any>;
|
||||
putCipherCollections: (id: string, request: CipherCollectionsRequest) => Promise<any>;
|
||||
putCipherCollections: (id: string, request: CipherCollectionsRequest) => Promise<CipherResponse>;
|
||||
putCipherCollectionsAdmin: (id: string, request: CipherCollectionsRequest) => Promise<any>;
|
||||
postPurgeCiphers: (request: SecretVerificationRequest, organizationId?: string) => Promise<any>;
|
||||
putDeleteCipher: (id: string) => Promise<any>;
|
||||
|
|
|
@ -565,8 +565,12 @@ export class ApiService implements ApiServiceAbstraction {
|
|||
return this.send("PUT", "/ciphers/share", request, true, false);
|
||||
}
|
||||
|
||||
putCipherCollections(id: string, request: CipherCollectionsRequest): Promise<any> {
|
||||
return this.send("PUT", "/ciphers/" + id + "/collections", request, true, false);
|
||||
async putCipherCollections(
|
||||
id: string,
|
||||
request: CipherCollectionsRequest,
|
||||
): Promise<CipherResponse> {
|
||||
const response = await this.send("PUT", "/ciphers/" + id + "/collections", request, true, true);
|
||||
return new CipherResponse(response);
|
||||
}
|
||||
|
||||
putCipherCollectionsAdmin(id: string, request: CipherCollectionsRequest): Promise<any> {
|
||||
|
|
|
@ -683,8 +683,8 @@ export class CipherService implements CipherServiceAbstraction {
|
|||
|
||||
async saveCollectionsWithServer(cipher: Cipher): Promise<any> {
|
||||
const request = new CipherCollectionsRequest(cipher.collectionIds);
|
||||
await this.apiService.putCipherCollections(cipher.id, request);
|
||||
const data = cipher.toCipherData();
|
||||
const response = await this.apiService.putCipherCollections(cipher.id, request);
|
||||
const data = new CipherData(response);
|
||||
await this.upsert(data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue