mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
committed by
Sebastian Lange
parent
88f87a2ce1
commit
e1039aa226
@@ -17,7 +17,7 @@ import {HTTP_INTERCEPTORS, HttpClient,
|
||||
import {Injectable} from '@angular/core';
|
||||
import {SCIndexResponse, SCThingType} from '@openstapps/core';
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {map, delay} from 'rxjs/operators';
|
||||
import {SampleThings} from './data/sample-things';
|
||||
|
||||
const sampleIndexResponse: SCIndexResponse = {
|
||||
@@ -150,12 +150,12 @@ export class FakeBackendInterceptor implements HttpInterceptor {
|
||||
return this.sampleFetcher.getSampleThing(request.body.filter.arguments.value)
|
||||
.pipe(map((sampleData: any) => {
|
||||
return new HttpResponse({status: 200, body: {data: sampleData}});
|
||||
}));
|
||||
}), delay(1000)); // add delay for skeleton screens to be seen (see !16)
|
||||
}
|
||||
}
|
||||
return this.sampleFetcher.getSampleThings().pipe(map((sampleData: any) => {
|
||||
return new HttpResponse({status: 200, body: {data: sampleData}});
|
||||
}));
|
||||
}), delay(1000)); // add delay for skeleton screens to be seen (see !16)
|
||||
}
|
||||
}
|
||||
return next.handle(request);
|
||||
|
||||
Reference in New Issue
Block a user