diff --git a/src/accounts/account.service.ts b/src/accounts/account.service.ts index 93a2818..02cd80a 100644 --- a/src/accounts/account.service.ts +++ b/src/accounts/account.service.ts @@ -26,7 +26,7 @@ export class AccountService { } get(id: number): Observable { - return this.http.get(this.url + '/' + id) + return this.http.get(this.url + id) .catch((res: Response) => Observable.throw(res.json())) .map((res: Response) => res.json()); } @@ -46,7 +46,7 @@ export class AccountService { let options = new RequestOptions({ headers: headers }); let body = JSON.stringify(account); - return this.http.post(this.url + '/' + account.id, body, options) + return this.http.post(this.url + account.id, body, options) .catch((res: Response) => Observable.throw(res.json())) .map((res: Response) => res.json()); } @@ -55,7 +55,7 @@ export class AccountService { let headers = new Headers({ 'Content-Type': 'application/json' }); let options = new RequestOptions({ headers: headers }); - return this.http.delete(this.url + '/' + account.id) + return this.http.delete(this.url + account.id) .catch((res: Response) => Observable.throw(res.json())) .map((res: Response) => res.json()); }