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

add API for user collections

This commit is contained in:
Kyle Spearrin
2018-10-17 11:18:12 -04:00
parent 00efae2616
commit 0d8e09b3f1
2 changed files with 6 additions and 0 deletions

View File

@@ -434,6 +434,11 @@ export class ApiService implements ApiServiceAbstraction {
return new CollectionGroupDetailsResponse(r);
}
async getUserCollections(): Promise<ListResponse<CollectionResponse>> {
const r = await this.send('GET', '/collections', null, true, true);
return new ListResponse(r, CollectionResponse);
}
async getCollections(organizationId: string): Promise<ListResponse<CollectionResponse>> {
const r = await this.send('GET', '/organizations/' + organizationId + '/collections', null, true, true);
return new ListResponse(r, CollectionResponse);