summaryrefslogtreecommitdiff
path: root/recipeBuddy
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-02 23:10:01 -0500
committerTucker Evans <tuckerevans24@gmail.com>2019-12-02 23:10:01 -0500
commit04c3b3fd7ffd2e377f7e443b072a86a332e94ac1 (patch)
treed71da6b57852f97d74fcd91e324304350ea97e9c /recipeBuddy
parentb00429267a9bfe0a3e44290330fac299e00c2753 (diff)
Add updateRecipe to backend
Diffstat (limited to 'recipeBuddy')
-rw-r--r--recipeBuddy/src/app/REST_service/backend.service.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/REST_service/backend.service.ts b/recipeBuddy/src/app/REST_service/backend.service.ts
index e6456ce..8ae05ca 100644
--- a/recipeBuddy/src/app/REST_service/backend.service.ts
+++ b/recipeBuddy/src/app/REST_service/backend.service.ts
@@ -64,6 +64,12 @@ export class BackendService {
JSON.stringify(data), this.httpOptions)
}
+ updateRecipe(data): Observable<Recipe>
+ {
+ return this.http.put<Recipe>(this.apiURL + '/recipes/' + data.id,
+ JSON.stringify(data), this.httpOptions)
+ }
+
handleError(error) {
let errMsg = '';
if (error.error instanceof ErrorEvent) {