Display the num of minutes of flights
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpEvent, HttpRequest, HttpResponse, HttpInterceptor, HttpHandler } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
// import { Observable } from 'rxjs/Observable';
|
||||
// import 'rxjs/add/observable/of';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import 'rxjs/add/observable/of';
|
||||
import { Observable, of } from 'rxjs';
|
||||
|
||||
import { RequestCache } from '../services/request-cache.service';
|
||||
|
||||
@@ -13,7 +14,7 @@ export class CachingInterceptor implements HttpInterceptor {
|
||||
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler) {
|
||||
const cachedResponse = this.cache.get(req);
|
||||
return cachedResponse ? Observable.of(cachedResponse) : this.sendRequest(req, next);
|
||||
return cachedResponse ? of(cachedResponse) : this.sendRequest(req, next);
|
||||
}
|
||||
|
||||
sendRequest(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
Reference in New Issue
Block a user