mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
[AC-1890] Update the collection PUT/POST response models to include collection permission details (#7512)
This commit is contained in:
@@ -133,6 +133,7 @@ import { AttachmentResponse } from "../vault/models/response/attachment.response
|
||||
import { CipherResponse } from "../vault/models/response/cipher.response";
|
||||
import {
|
||||
CollectionAccessDetailsResponse,
|
||||
CollectionDetailsResponse,
|
||||
CollectionResponse,
|
||||
} from "../vault/models/response/collection.response";
|
||||
import { SyncResponse } from "../vault/models/response/sync.response";
|
||||
@@ -770,7 +771,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
async postCollection(
|
||||
organizationId: string,
|
||||
request: CollectionRequest,
|
||||
): Promise<CollectionResponse> {
|
||||
): Promise<CollectionDetailsResponse> {
|
||||
const r = await this.send(
|
||||
"POST",
|
||||
"/organizations/" + organizationId + "/collections",
|
||||
@@ -778,14 +779,14 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
true,
|
||||
true,
|
||||
);
|
||||
return new CollectionResponse(r);
|
||||
return new CollectionDetailsResponse(r);
|
||||
}
|
||||
|
||||
async putCollection(
|
||||
organizationId: string,
|
||||
id: string,
|
||||
request: CollectionRequest,
|
||||
): Promise<CollectionResponse> {
|
||||
): Promise<CollectionDetailsResponse> {
|
||||
const r = await this.send(
|
||||
"PUT",
|
||||
"/organizations/" + organizationId + "/collections/" + id,
|
||||
@@ -793,7 +794,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
true,
|
||||
true,
|
||||
);
|
||||
return new CollectionResponse(r);
|
||||
return new CollectionDetailsResponse(r);
|
||||
}
|
||||
|
||||
async putCollectionUsers(
|
||||
|
||||
Reference in New Issue
Block a user