Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"luggage",
"name",
"price",
"seats",
"imageUrl"
];
@Injectable()
export class CarService {
private static cloneUpdateModel(car: Car): object {
// tslint:disable-next-line:ban-comma-operator
return editableProperties.reduce((a, e) => (a[e] = car[e], a), { _id: car.id });
}
private allCars: Array = [];
private carsStore = Kinvey.DataStore.collection("cars");
getCarById(id: string): Car {
if (!id) {
return;
}
return this.allCars.filter((car) => {
return car.id === id;
})[0];
}
load(): Observable {
return new Observable((observer: any) => {
this.login().then(() => {
return this.carsStore.sync();
}).then(() => {