mirror of
https://github.com/bitwarden/browser
synced 2026-02-12 22:44:11 +00:00
* replace getOrgKey with orgKey$, refactor collectionAdminService * clean up * uncomment accidental commet * remove cache
21 lines
729 B
TypeScript
21 lines
729 B
TypeScript
import { Injectable } from "@angular/core";
|
|
import { firstValueFrom } from "rxjs";
|
|
|
|
import { CollectionAdminService, CollectionAdminView } from "@bitwarden/admin-console/common";
|
|
import { ImportCollectionServiceAbstraction } from "@bitwarden/importer-core";
|
|
import { UserId } from "@bitwarden/user-core";
|
|
|
|
@Injectable()
|
|
export class ImportCollectionAdminService implements ImportCollectionServiceAbstraction {
|
|
constructor(private collectionAdminService: CollectionAdminService) {}
|
|
|
|
async getAllAdminCollections(
|
|
organizationId: string,
|
|
userId: UserId,
|
|
): Promise<CollectionAdminView[]> {
|
|
return await firstValueFrom(
|
|
this.collectionAdminService.collectionAdminViews$(organizationId, userId),
|
|
);
|
|
}
|
|
}
|