Mise à jours du dashboard
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
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 { Canopy, CanopyBySize ,JumpList, JumpListConfig, JumpListFilters } from 'src/app/core/models';
|
||||
import { Canopy, CanopyBySize, CanopyByYear, CanopyModelBySize, CanopyModelByYear } from 'src/app/core/models';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class CanopiesService {
|
||||
@@ -13,7 +12,22 @@ export class CanopiesService {
|
||||
) { }
|
||||
|
||||
getAllBySize(): Observable<Array<CanopyBySize>> {
|
||||
return this.apiService.get('/canopies')
|
||||
return this.apiService.get('/canopies/allBySize')
|
||||
.pipe(map(data => data.canopies));
|
||||
}
|
||||
|
||||
getAllByYear(): Observable<Array<CanopyByYear>> {
|
||||
return this.apiService.get('/canopies/allByYear')
|
||||
.pipe(map(data => data.canopies));
|
||||
}
|
||||
|
||||
getAllModelBySize(): Observable<Array<CanopyModelBySize>> {
|
||||
return this.apiService.get('/canopies/allModelBySize')
|
||||
.pipe(map(data => data.canopies));
|
||||
}
|
||||
|
||||
getAllModelByYear(): Observable<Array<CanopyModelByYear>> {
|
||||
return this.apiService.get('/canopies/allModelByYear')
|
||||
.pipe(map(data => data.canopies));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user