From 04c3b3fd7ffd2e377f7e443b072a86a332e94ac1 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Mon, 2 Dec 2019 23:10:01 -0500 Subject: Add updateRecipe to backend --- recipeBuddy/src/app/REST_service/backend.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'recipeBuddy/src') 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 + { + return this.http.put(this.apiURL + '/recipes/' + data.id, + JSON.stringify(data), this.httpOptions) + } + handleError(error) { let errMsg = ''; if (error.error instanceof ErrorEvent) { -- cgit v1.1