diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-02 22:58:08 -0500 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-02 22:58:08 -0500 |
commit | b00429267a9bfe0a3e44290330fac299e00c2753 (patch) | |
tree | d6e19027cd903801518d6ad4d8e6c5977fded80c /recipeBuddy | |
parent | d70c3e598450a71ae3971770f63d13dbf6838952 (diff) |
Add createRecipe to backend service
Diffstat (limited to 'recipeBuddy')
-rw-r--r-- | recipeBuddy/src/app/REST_service/backend.service.ts | 6 |
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) { |