diff options
author | 2022-01-05 17:10:50 +0100 | |
---|---|---|
committer | 2022-01-05 17:10:50 +0100 | |
commit | f8277e2e3a736a75e9174d55fec816dff04b2aae (patch) | |
tree | 1b9a4fcc5bac69c033911fb394faf65274257f4b /src/internal-server/app/Controllers/Http/RecipeController.js | |
parent | 5.6.9-nightly.0 [skip ci] (diff) | |
download | ferdium-app-f8277e2e3a736a75e9174d55fec816dff04b2aae.tar.gz ferdium-app-f8277e2e3a736a75e9174d55fec816dff04b2aae.tar.zst ferdium-app-f8277e2e3a736a75e9174d55fec816dff04b2aae.zip |
Replace hard-coded popular services in internal server
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 |