refactor: key rotation (#2383)

This commit is contained in:
Mo
2023-08-04 09:25:28 -05:00
committed by GitHub
parent a7f266bb68
commit 494436bdb6
65 changed files with 1354 additions and 1232 deletions

View File

@@ -6,12 +6,12 @@ import { Result, UseCaseInterface } from '@standardnotes/domain-core'
export class GetVaultContacts implements UseCaseInterface<TrustedContactInterface[]> {
constructor(
private findContact: FindContact,
private getVaultUsers: GetVaultUsers,
private _findContact: FindContact,
private _getVaultUsers: GetVaultUsers,
) {}
async execute(dto: { sharedVaultUuid: string; readFromCache: boolean }): Promise<Result<TrustedContactInterface[]>> {
const users = await this.getVaultUsers.execute({
const users = await this._getVaultUsers.execute({
sharedVaultUuid: dto.sharedVaultUuid,
readFromCache: dto.readFromCache,
})
@@ -21,7 +21,7 @@ export class GetVaultContacts implements UseCaseInterface<TrustedContactInterfac
const contacts = users
.getValue()
.map((user) => this.findContact.execute({ userUuid: user.user_uuid }))
.map((user) => this._findContact.execute({ userUuid: user.user_uuid }))
.map((result) => (result.isFailed() ? undefined : result.getValue()))
.filter(isNotUndefined)