Ajout des sources
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpParams } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { ApiService } from './api.service';
|
||||
import { Aeronef, AeronefAggregate, AeronefList, JumpList, JumpListConfig, JumpListFilters } from 'src/app/core/models';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AeronefsService {
|
||||
constructor(
|
||||
private apiService: ApiService
|
||||
) { }
|
||||
|
||||
getAll(): Observable<Array<AeronefAggregate>> {
|
||||
return this.apiService.get('/aeronefs')
|
||||
.pipe(map(data => data.aeronefs));
|
||||
/*
|
||||
//return this.apiService.get('/aeronefs');
|
||||
return this.apiService.get('/aeronefs')
|
||||
.pipe(map(data => {
|
||||
return {
|
||||
aeronefs: <Array<Aeronef>>data.aeronefs,
|
||||
aeronefsCount: <number>data.aeronefsCount
|
||||
};
|
||||
}));
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user