Skip to content

Commit

Permalink
fix: http -> httpClient
Browse files Browse the repository at this point in the history
  • Loading branch information
stbui committed May 1, 2018
1 parent f0feadb commit 6cb42bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/crm/lead/lead.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { HttpClient } from '@angular/common/http';
import { environment } from '../../../environments/environment';
import 'rxjs/add/operator/toPromise';

Expand All @@ -8,11 +8,11 @@ export class LeadService {

private apiUrl = environment.crmApi;

constructor(private _http: Http) {
constructor(private _http: HttpClient) {
}

getLead() {
const url = `${this.apiUrl}/contacts.json`;
return this._http.get(url).toPromise().then(res => res.json());
return this._http.get(url).toPromise();
}
}

0 comments on commit 6cb42bc

Please sign in to comment.