Browse Source

feat(client): replace constructor based DI with inject functions

pull/7175/head
KenTandrian 2 weeks ago
parent
commit
ad94abe021
  1. 8
      apps/client/src/app/services/web-authn.service.ts

8
apps/client/src/app/services/web-authn.service.ts

@ -6,7 +6,7 @@ import {
} from '@ghostfolio/common/interfaces'; } from '@ghostfolio/common/interfaces';
import { HttpClient } from '@angular/common/http'; import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core'; import { inject, Injectable } from '@angular/core';
import { import {
startAuthentication, startAuthentication,
startRegistration startRegistration
@ -20,10 +20,8 @@ import { catchError, switchMap, tap } from 'rxjs/operators';
export class WebAuthnService { export class WebAuthnService {
private static readonly WEB_AUTH_N_DEVICE_ID = 'WEB_AUTH_N_DEVICE_ID'; private static readonly WEB_AUTH_N_DEVICE_ID = 'WEB_AUTH_N_DEVICE_ID';
public constructor( private readonly http = inject(HttpClient);
private http: HttpClient, private readonly settingsStorageService = inject(SettingsStorageService);
private settingsStorageService: SettingsStorageService
) {}
public isSupported() { public isSupported() {
return typeof PublicKeyCredential !== 'undefined'; return typeof PublicKeyCredential !== 'undefined';

Loading…
Cancel
Save