1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 16:43:27 +00:00

Remove optional userId and deprecated method

This commit is contained in:
Jeffrey Holland
2025-09-04 13:44:41 +02:00
parent f4b3aec3a9
commit d05167b738

View File

@@ -598,7 +598,7 @@ export class CipherService implements CipherServiceAbstraction {
async getAllDecryptedForUrl(
url: string,
userId?: UserId,
userId: UserId,
includeOtherTypes?: CipherType[],
defaultMatch: UriMatchStrategySetting = null,
): Promise<CipherView[]> {
@@ -619,10 +619,12 @@ export class CipherService implements CipherServiceAbstraction {
}
async getAllDecryptedForIds(userId: UserId, ids: string[]): Promise<CipherView[]> {
if (userId) {
const ciphers = await this.getAllDecrypted(userId);
return ciphers.filter((cipher) => ids.includes(cipher.id));
}
return firstValueFrom(
this.cipherViews$(userId).pipe(
filter((ciphers) => ciphers != null),
map((ciphers) => ciphers.filter((cipher) => ids.includes(cipher.id))),
),
);
}
async filterCiphersForUrl<C extends CipherViewLike>(