aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/services/cupboard.service.ts
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2025-04-06 15:15:47 -0400
committersowgro <tpoke.ferrari@gmail.com>2025-04-06 15:15:47 -0400
commit9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6 (patch)
tree8af111a538a8d6361e1cf07467b9c31568284921 /ufund-ui/src/app/services/cupboard.service.ts
parent1ac878b4aaa19ab889c7a98b7dab6acd57c778b3 (diff)
parent04cb51b2e7891785c956c5faa73fb88cc04e82e0 (diff)
downloadJellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.tar.gz
JellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.tar.bz2
JellySolutions-9f14b3787a8cfc49fd168b1242adcc6d5fa8bfd6.zip
Merge branch 'main' into light-mode
# Conflicts: # ufund-ui/src/app/app.component.html # ufund-ui/src/app/components/funding-basket/funding-basket.component.html # ufund-ui/src/app/components/need-list/need-list.component.html # ufund-ui/src/app/components/need-page/need-page.component.css
Diffstat (limited to 'ufund-ui/src/app/services/cupboard.service.ts')
-rw-r--r--ufund-ui/src/app/services/cupboard.service.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/ufund-ui/src/app/services/cupboard.service.ts b/ufund-ui/src/app/services/cupboard.service.ts
index 9232c0c..a87dee2 100644
--- a/ufund-ui/src/app/services/cupboard.service.ts
+++ b/ufund-ui/src/app/services/cupboard.service.ts
@@ -23,8 +23,8 @@ export class CupboardService {
private authService: AuthService
) {}
- createNeed(need: Need): Observable<boolean> {
- return this.http.post<boolean>(this.url, need, this.httpOptions())
+ createNeed(need: Need): Observable<Need> {
+ return this.http.post<Need>(this.url, need, this.httpOptions())
}
getNeeds(): Observable<Need[]> {
@@ -47,7 +47,7 @@ export class CupboardService {
return this.http.delete<boolean>(`${this.url}/${id}`, this.httpOptions())
}
- checkoutNeed(id: number, quantity: number) {
- return this.http.put(`${this.url}/checkout`, {needID: id, amount: quantity}, this.httpOptions())
+ checkoutNeed(data: {needID: number, quantity: number}[]) {
+ return this.http.put(`${this.url}/checkout`, data, this.httpOptions())
}
}