diff options
Diffstat (limited to 'ufund-ui/src/app/services/cupboard.service.ts')
-rw-r--r-- | ufund-ui/src/app/services/cupboard.service.ts | 8 |
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()) } } |