Guest User

Untitled

a guest
Apr 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. putIp(ip, data): any {
  2. const url = `${this.IpUrl}/${ip}`;
  3. return this.authHttp.put(url, data, {headers: this.headers});}
  4.  
  5. publishIps(): void {
  6. console.log("Publishing Ips")
  7.  
  8. for (let _i = 0; _i < this.ipsInTable.length; _i++) {
  9. this.ipsInTable[_i].treated = true;
  10. this.ipService.putIp(this.ipsInTable[_i].id, this.ipsInTable[_i].json)
  11. .catch(err => {
  12. this.ipsInTable[_i].result = false;
  13. this.ipsInTable[_i].message = "Error";
  14. return Observable.throw(this.errorHandler(err));
  15. })
  16. .subscribe((data) => {
  17. // Doing some stuff
  18. });
  19. }
  20. }
Add Comment
Please, Sign In to add comment