summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'recipeBuddy/src/app')
-rw-r--r--recipeBuddy/src/app/REST_service/backend.service.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/recipeBuddy/src/app/REST_service/backend.service.ts b/recipeBuddy/src/app/REST_service/backend.service.ts
index 7834cb5..cc08bc6 100644
--- a/recipeBuddy/src/app/REST_service/backend.service.ts
+++ b/recipeBuddy/src/app/REST_service/backend.service.ts
@@ -37,6 +37,16 @@ export class BackendService {
)}
+ getRecipes(): Observable<number[]>
+ {
+ return this.http.get<MsgList>(this.apiURL + '/recipes')
+ .pipe (
+ retry(1),
+ map(msg => msg.Data),
+ catchError(this.handleError)
+ )
+ }
+
handleError(error) {
let errMsg = '';
if (error.error instanceof ErrorEvent) {