From c02c47efcb00782feb1461534923023a711d4f15 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sun, 2 Mar 2025 11:22:48 -0500 Subject: First attempt at an authentication system. --- ufund-ui/src/app/services/cupboard.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ufund-ui/src/app/services/cupboard.service.ts') diff --git a/ufund-ui/src/app/services/cupboard.service.ts b/ufund-ui/src/app/services/cupboard.service.ts index c123841..4a2b4b0 100644 --- a/ufund-ui/src/app/services/cupboard.service.ts +++ b/ufund-ui/src/app/services/cupboard.service.ts @@ -18,8 +18,7 @@ export class CupboardService { ) {} createNeed(need: Need): Observable { - return this.http.post( - this.url, need, this.httpOptions) + return this.http.post(this.url, need, this.httpOptions) } getNeeds(): Observable { -- cgit v1.2.3 From b90f796f2ebedccb4af9ccfd550913e4e7e54cab Mon Sep 17 00:00:00 2001 From: benal01 Date: Thu, 6 Mar 2025 11:10:08 -0500 Subject: changed delete method to use DELETE instead of PUT --- ufund-ui/src/app/services/cupboard.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ufund-ui/src/app/services/cupboard.service.ts') diff --git a/ufund-ui/src/app/services/cupboard.service.ts b/ufund-ui/src/app/services/cupboard.service.ts index c123841..5a92b0a 100644 --- a/ufund-ui/src/app/services/cupboard.service.ts +++ b/ufund-ui/src/app/services/cupboard.service.ts @@ -39,6 +39,6 @@ export class CupboardService { } deleteNeed(id: number): Observable { - return this.http.put(`${this.url}/${id}`, this.httpOptions) + return this.http.delete(`${this.url}/${id}`, this.httpOptions) } } -- cgit v1.2.3 From 0790d1a6fbe62be5d7cf1a688f01419928abe51a Mon Sep 17 00:00:00 2001 From: benal01 Date: Mon, 17 Mar 2025 17:04:15 -0400 Subject: corrected incorrect formatting for update-need api controller --- ufund-ui/src/app/services/cupboard.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ufund-ui/src/app/services/cupboard.service.ts') diff --git a/ufund-ui/src/app/services/cupboard.service.ts b/ufund-ui/src/app/services/cupboard.service.ts index 5a92b0a..6727060 100644 --- a/ufund-ui/src/app/services/cupboard.service.ts +++ b/ufund-ui/src/app/services/cupboard.service.ts @@ -35,7 +35,7 @@ export class CupboardService { } updateNeed(id: number, data: Need): Observable { - return this.http.put(`${this.url}/${id}`, data, this.httpOptions) + return this.http.put(`${this.url}`, data, this.httpOptions) } deleteNeed(id: number): Observable { -- cgit v1.2.3 From 54876363de44791ba65b6c43b795f8d0c3548ecc Mon Sep 17 00:00:00 2001 From: sowgro Date: Mon, 17 Mar 2025 21:45:31 -0400 Subject: Fix tests --- ufund-ui/src/app/services/cupboard.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ufund-ui/src/app/services/cupboard.service.ts') diff --git a/ufund-ui/src/app/services/cupboard.service.ts b/ufund-ui/src/app/services/cupboard.service.ts index 3b9aef6..9e14106 100644 --- a/ufund-ui/src/app/services/cupboard.service.ts +++ b/ufund-ui/src/app/services/cupboard.service.ts @@ -34,7 +34,7 @@ export class CupboardService { } updateNeed(id: number, data: Need): Observable { - return this.http.put(`${this.url}`, data, this.httpOptions) + return this.http.put(`${this.url}/${id}`, data, this.httpOptions) } deleteNeed(id: number): Observable { -- cgit v1.2.3