Use useClass instead of useFactory (#6076)

This commit is contained in:
Oscar Hinton 2023-08-22 14:47:52 +02:00 committed by GitHub
parent 607e697764
commit 019d4c2932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 29 deletions

View File

@ -452,35 +452,7 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction";
}, },
{ {
provide: VaultTimeoutService, provide: VaultTimeoutService,
useFactory: ( useClass: VaultTimeoutService,
cipherService: CipherServiceAbstraction,
folderService: FolderServiceAbstraction,
collectionService: CollectionServiceAbstraction,
cryptoService: CryptoServiceAbstraction,
platformUtilsService: PlatformUtilsServiceAbstraction,
messagingService: MessagingServiceAbstraction,
searchService: SearchServiceAbstraction,
stateService: StateServiceAbstraction,
authService: AuthServiceAbstraction,
vaultTimeoutSettingsService: VaultTimeoutSettingsServiceAbstraction,
lockedCallback: (userId?: string) => Promise<void>,
logoutCallback: (expired: boolean, userId?: string) => Promise<void>
) => {
return new VaultTimeoutService(
cipherService,
folderService,
collectionService,
cryptoService,
platformUtilsService,
messagingService,
searchService,
stateService,
authService,
vaultTimeoutSettingsService,
lockedCallback,
logoutCallback
);
},
deps: [ deps: [
CipherServiceAbstraction, CipherServiceAbstraction,
FolderServiceAbstraction, FolderServiceAbstraction,