From 0f1df535a7e0aa3b85e0d2b7112a4db58963a3b3 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Fri, 3 Jul 2020 15:15:29 +0000 Subject: [PATCH] Fix URLs for entity creation Signed-off-by: William Brawner --- src/app/shared/twigs.http.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/shared/twigs.http.service.ts b/src/app/shared/twigs.http.service.ts index 839902d..9e96811 100644 --- a/src/app/shared/twigs.http.service.ts +++ b/src/app/shared/twigs.http.service.ts @@ -44,7 +44,7 @@ export class TwigsHttpService implements TwigsService { 'email': email, 'password': password }; - return this.http.post(this.apiUrl + '/users/new', params, this.options); + return this.http.post(this.apiUrl + '/users', params, this.options); } logout(): Observable { @@ -75,7 +75,7 @@ export class TwigsHttpService implements TwigsService { }; }) }; - return this.http.post(this.apiUrl + '/budgets/new', params, this.options); + return this.http.post(this.apiUrl + '/budgets', params, this.options); } updateBudget(id: number, changes: object): Observable { @@ -106,7 +106,7 @@ export class TwigsHttpService implements TwigsService { 'expense': isExpense, 'budgetId': budgetId }; - return this.http.post(this.apiUrl + '/categories/new', params, this.options); + return this.http.post(this.apiUrl + '/categories', params, this.options); } updateCategory(budgetId: number, id: number, changes: object): Observable { @@ -170,7 +170,7 @@ export class TwigsHttpService implements TwigsService { 'categoryId': category, 'budgetId': budgetId }; - return this.http.post(this.apiUrl + '/transactions/new', params, this.options); + return this.http.post(this.apiUrl + '/transactions', params, this.options); } updateTransaction(budgetId: number, id: number, changes: object): Observable {