Import des sources angular à partir de 'headup_app'
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
import { ApiService } from './api.service';
|
||||
import { AeronefByImat, AeronefByYear } from 'src/app/core/models';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AeronefsService {
|
||||
constructor(
|
||||
private apiService: ApiService
|
||||
) { }
|
||||
|
||||
getAllByImat(): Observable<Array<AeronefByImat>> {
|
||||
return this.apiService.get('/aeronefs/allByImat')
|
||||
.pipe(map(data => data.aeronefs));
|
||||
}
|
||||
|
||||
getAllByImatByYear(): Observable<Array<AeronefByYear>> {
|
||||
return this.apiService.get('/aeronefs/allByImatByYear')
|
||||
.pipe(map(data => data.aeronefs));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user