Browse Source

feat(client): implement generic type parameter

pull/6957/head
KenTandrian 3 months ago
parent
commit
9d87bf646c
  1. 6
      apps/client/src/app/core/http-response.interceptor.ts

6
apps/client/src/app/core/http-response.interceptor.ts

@ -39,10 +39,10 @@ export class HttpResponseInterceptor implements HttpInterceptor {
this.info = this.dataService.fetchInfo();
}
public intercept(
request: HttpRequest<any>,
public intercept<T>(
request: HttpRequest<T>,
next: HttpHandler
): Observable<HttpEvent<any>> {
): Observable<HttpEvent<T>> {
return next.handle(request).pipe(
catchError((error: HttpErrorResponse) => {
if (error.status === StatusCodes.FORBIDDEN) {

Loading…
Cancel
Save