summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-02 22:58:08 -0500
committerTucker Evans <tuckerevans24@gmail.com>2019-12-02 22:58:08 -0500
commitb00429267a9bfe0a3e44290330fac299e00c2753 (patch)
treed6e19027cd903801518d6ad4d8e6c5977fded80c
parentd70c3e598450a71ae3971770f63d13dbf6838952 (diff)
Add createRecipe to backend service
-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 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<Recipe>
+ {
+ return this.http.post<Recipe>(this.apiURL + '/recipes',
+ JSON.stringify(data), this.httpOptions)
+ }
+
handleError(error) {
let errMsg = '';
if (error.error instanceof ErrorEvent) {