X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fauth%2Fauth-http.service.ts;h=c4114aa023c5e555e5db47c8cb4fc39e35649f43;hb=c16ce1de8e8c21ad2136335d3b0b7d230e6d2f24;hp=6027265705eac94a7b5f27df78eb5e29d15fe664;hpb=80deae8d198f6a376b477d780e76966f8fbb72ce;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/auth/auth-http.service.ts b/client/src/app/shared/auth/auth-http.service.ts index 602726570..c4114aa02 100644 --- a/client/src/app/shared/auth/auth-http.service.ts +++ b/client/src/app/shared/auth/auth-http.service.ts @@ -80,12 +80,14 @@ export class AuthHttp extends Http { } } +export function useFactory(backend: XHRBackend, defaultOptions: RequestOptions, authService: AuthService) { + return new AuthHttp(backend, defaultOptions, authService); +} + export const AUTH_HTTP_PROVIDERS = [ { provide: AuthHttp, - useFactory: (backend: XHRBackend, defaultOptions: RequestOptions, authService: AuthService) => { - return new AuthHttp(backend, defaultOptions, authService); - }, + useFactory, deps: [ XHRBackend, RequestOptions, AuthService ] }, ];