diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-02 23:10:01 -0500 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-12-02 23:10:01 -0500 |
commit | 04c3b3fd7ffd2e377f7e443b072a86a332e94ac1 (patch) | |
tree | d71da6b57852f97d74fcd91e324304350ea97e9c /recipeBuddy | |
parent | b00429267a9bfe0a3e44290330fac299e00c2753 (diff) |
Add updateRecipe to backend
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 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) { |