1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-14 23:45:37 +00:00

Update function signature

This commit is contained in:
Bernd Schoolmann
2025-12-11 14:06:55 +01:00
parent 740727407c
commit d394a3d14a

View File

@@ -76,16 +76,17 @@ export default class Domain {
viewModel: ViewEncryptableKeys<V>,
props: EncryptableKeys<D, V>[],
orgId: null,
key: SymmetricCryptoKey | null,
key: SymmetricCryptoKey,
objectContext: string = "No Domain Context",
): Promise<V> {
const encryptService = Utils.getContainerService().getEncryptService();
for (const prop of props) {
if (domain[prop] == null) {
viewModel[prop] = null;
continue;
}
try {
viewModel[prop] = await encryptService.decryptString(domain[prop]!, key!);
viewModel[prop] = await encryptService.decryptString(domain[prop]!, key);
} catch (e) {
throw new Error(
`Failed to decrypt property '${String(