filter collections for current org

This commit is contained in:
Kyle Spearrin 2018-10-24 22:09:36 -04:00
parent 171589fb3d
commit 340e377b37
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ export class CollectionsComponent implements OnInit {
} else { } else {
response = await this.apiService.getUserCollections(); response = await this.apiService.getUserCollections();
} }
const collections = response.data.map((r) => const collections = response.data.filter((c) => c.organizationId === this.organizationId).map((r) =>
new Collection(new CollectionData(r as CollectionDetailsResponse))); new Collection(new CollectionData(r as CollectionDetailsResponse)));
this.collections = await this.collectionService.decryptMany(collections); this.collections = await this.collectionService.decryptMany(collections);
this.loading = false; this.loading = false;