summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-12-14 14:07:36 -0500
committerTucker Evans <tuckerevans24@gmail.com>2019-12-14 16:00:13 -0500
commit89cc24f3034aa8b4e8f24647c41173a7c3734e39 (patch)
treea5bc47ad5c4b5ef97f0098180acf46b3f7af5932 /recipeBuddy/src/app/add-recipe/add-recipe.component.ts
parent4ec8cbd63deb6cb8b24db58b36ecd4a3ccdda79e (diff)
WIP-Changes made for demo, should be reviewed and merged as needed.WIP-demo_changes
Diffstat (limited to 'recipeBuddy/src/app/add-recipe/add-recipe.component.ts')
-rw-r--r--recipeBuddy/src/app/add-recipe/add-recipe.component.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
index 3c32ae7..d27998a 100644
--- a/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
+++ b/recipeBuddy/src/app/add-recipe/add-recipe.component.ts
@@ -124,7 +124,8 @@ export class AddRecipeComponent {
formData.tags.split(',').filter(word=> !(word==="")), //tags
formData.photos.split(',').filter(word=> !(word==="")) //photos
);
- this.restService.createRecipe(recipe).subscribe();
+ this.restService.createRecipe(recipe).subscribe(res => {
this.router.navigate(['/']);
+ }, err => console.log(err));
}
}