1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[PS-1078] Refactor FolderService to use Observables (#3022)

This commit is contained in:
Oscar Hinton
2022-07-12 20:25:18 +02:00
committed by GitHub
parent a43aa9612c
commit 23253b3882
32 changed files with 421 additions and 180 deletions

View File

@@ -1,3 +1,5 @@
import { firstValueFrom } from "rxjs";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
@@ -358,7 +360,7 @@ export class GetCommand extends DownloadCommand {
decFolder = await folder.decrypt();
}
} else if (id.trim() !== "") {
let folders = await this.folderService.getAllDecrypted();
let folders = await firstValueFrom(this.folderService.folderViews$);
folders = CliUtils.searchFolders(folders, id);
if (folders.length > 1) {
return Response.multipleResults(folders.map((f) => f.id));