summaryrefslogtreecommitdiff
path: root/recipeBuddy
diff options
context:
space:
mode:
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) {