mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 16:13:06 +00:00
refactor: move web http client to a new file
This commit is contained in:
@@ -18,7 +18,7 @@ import {Client} from '@openstapps/api/lib/client';
|
||||
import {SCThing} from '@openstapps/core';
|
||||
import {Subject} from 'rxjs';
|
||||
import {debounceTime, distinctUntilChanged} from 'rxjs/operators';
|
||||
import {StAppsWebHttpClient} from '../data.provider';
|
||||
import {StAppsWebHttpClient} from '../stapps-web-http-client.provider';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-data-list',
|
||||
@@ -39,14 +39,14 @@ export class DataListComponent {
|
||||
loading: HTMLIonLoadingElement;
|
||||
|
||||
constructor(private loadingController: LoadingController,
|
||||
private alertController: AlertController,
|
||||
swHttpClient: StAppsWebHttpClient) {
|
||||
private alertController: AlertController,
|
||||
swHttpClient: StAppsWebHttpClient) {
|
||||
this.client = new Client(swHttpClient, 'https://stappsbe01.innocampus.tu-berlin.de', '1.0.6');
|
||||
|
||||
this.queryChanged
|
||||
.pipe(
|
||||
debounceTime(1000),
|
||||
distinctUntilChanged())
|
||||
debounceTime(1000),
|
||||
distinctUntilChanged())
|
||||
.subscribe((model) => {
|
||||
this.from = 0;
|
||||
this.query = model;
|
||||
|
||||
Reference in New Issue
Block a user