diff options
Diffstat (limited to 'src/internal-server/app/Controllers/Http/RecipeController.js')
-rw-r--r-- | src/internal-server/app/Controllers/Http/RecipeController.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/internal-server/app/Controllers/Http/RecipeController.js b/src/internal-server/app/Controllers/Http/RecipeController.js index d7ca716bb..daa9356f6 100644 --- a/src/internal-server/app/Controllers/Http/RecipeController.js +++ b/src/internal-server/app/Controllers/Http/RecipeController.js | |||
@@ -85,6 +85,21 @@ class RecipeController { | |||
85 | return response.send(results); | 85 | return response.send(results); |
86 | } | 86 | } |
87 | 87 | ||
88 | // Return an empty array | ||
89 | update({ | ||
90 | response, | ||
91 | }) { | ||
92 | return response.send([]); | ||
93 | } | ||
94 | |||
95 | async popularRecipes({ | ||
96 | response, | ||
97 | }) { | ||
98 | const recipesUrlFetch = await fetch(`${RECIPES_URL}/popular`); | ||
99 | const featuredRecipes = JSON.parse(await recipesUrlFetch.text()); | ||
100 | return response.send(featuredRecipes); | ||
101 | } | ||
102 | |||
88 | // Download a recipe | 103 | // Download a recipe |
89 | async download({ response, params }) { | 104 | async download({ response, params }) { |
90 | // Validate user input | 105 | // Validate user input |