Advertisement
Guest User

Untitled

a guest
Apr 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Dupa {
  2.     public getCars(): Cars {
  3.         return this.carsRepository.getCars()
  4.             .then((cars) => {
  5.                 return cars;
  6.             })
  7.             .then((cars) => {
  8.                 cars.forEach((car) => {
  9.                     this.someRepository.updateSomethingByCar(car)
  10.                         .then((sth) => console.log(sth));
  11.                 });
  12.             })
  13.             .catch((err) => console.log(err));
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement