From c6761e1379968c431b9af1ed38d512f7c800521d Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 14 Jul 2017 10:05:48 +0200 Subject: [PATCH] Fix URL in account service. --- src/accounts/account.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()); }