Browse Source
Merge pull request #5432 from abpframework/feat/5428
feat: provide ApiInterceptor in root and useExisting in CoreModule
pull/5439/head
Bunyamin Coskuner
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
npm/ng-packs/packages/core/src/lib/core.module.ts
-
npm/ng-packs/packages/core/src/lib/interceptors/api.interceptor.ts
|
|
|
@ -187,7 +187,7 @@ export class CoreModule { |
|
|
|
}, |
|
|
|
{ |
|
|
|
provide: HTTP_INTERCEPTORS, |
|
|
|
useClass: ApiInterceptor, |
|
|
|
useExisting: ApiInterceptor, |
|
|
|
multi: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
|
|
|
|
@ -6,7 +6,9 @@ import { SessionState } from '../states'; |
|
|
|
import { StartLoader, StopLoader } from '../actions/loader.actions'; |
|
|
|
import { finalize } from 'rxjs/operators'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
@Injectable({ |
|
|
|
providedIn: 'root', |
|
|
|
}) |
|
|
|
export class ApiInterceptor implements HttpInterceptor { |
|
|
|
constructor(private oAuthService: OAuthService, private store: Store) {} |
|
|
|
|
|
|
|
|