From 854b525d62729514fb0d81eda2f80baf86647a07 Mon Sep 17 00:00:00 2001 From: dw-0 Date: Sat, 12 Oct 2024 08:44:27 +0200 Subject: [PATCH] refactor: use inject syntax to provide services where necessary Signed-off-by: Dominik Willner --- apps/api/src/app/auth/google.strategy.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/api/src/app/auth/google.strategy.ts b/apps/api/src/app/auth/google.strategy.ts index 23035e61f..611e8a2a5 100644 --- a/apps/api/src/app/auth/google.strategy.ts +++ b/apps/api/src/app/auth/google.strategy.ts @@ -1,5 +1,6 @@ import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; +import { inject } from '@angular/core'; import { Injectable, Logger } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { Provider } from '@prisma/client'; @@ -9,11 +10,10 @@ import { AuthService } from './auth.service'; @Injectable() export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { - public constructor( - private readonly authService: AuthService, - // @ts-expect-error: Property is being used in the constructor - private readonly configurationService: ConfigurationService - ) { + private readonly authService = inject(AuthService); + + public constructor() { + const configurationService = inject(ConfigurationService); super({ callbackURL: `${configurationService.get( 'ROOT_URL'