import { Injectable } from '@angular/core' ; import { ApiService } from './api.service' ; import { Vehicle } from '../model/vehicle' ; @ Injectable ( ) export class VehicleService { constructor ( private apiService ) { } public getVehicles ( ) { return this . apiService . getVehicles ( ) ; } public getVehicle ( vehicleId ) { return this . apiService . getVehicle ( vehicleId ) ; } public createVehicle ( vehicle ) { return this . apiService . createVehicle ( vehicle ) ; } public updateVehicle ( vehicle ) { return this . apiService . updateVehicle ( vehicle ) ; } public deleteVehicle ( vehicleId ) { return this . apiService . deleteVehicle ( vehicleId ) ; } }