From b00429267a9bfe0a3e44290330fac299e00c2753 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Mon, 2 Dec 2019 22:58:08 -0500 Subject: Add createRecipe to backend service --- recipeBuddy/src/app/REST_service/backend.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipeBuddy/src/app/REST_service/backend.service.ts b/recipeBuddy/src/app/REST_service/backend.service.ts index 9903ad0..e6456ce 100644 --- a/recipeBuddy/src/app/REST_service/backend.service.ts +++ b/recipeBuddy/src/app/REST_service/backend.service.ts @@ -58,6 +58,12 @@ export class BackendService { ) } + createRecipe(data): Observable + { + return this.http.post(this.apiURL + '/recipes', + JSON.stringify(data), this.httpOptions) + } + handleError(error) { let errMsg = ''; if (error.error instanceof ErrorEvent) { -- cgit v1.1