diff options
author | 2022-07-25 08:16:50 +0530 | |
---|---|---|
committer | 2022-07-25 08:17:10 +0530 | |
commit | cf282aa351cbc58691fb1b2fb4764830247cdbe8 (patch) | |
tree | 1a6ac4c9abd8b3de9d358016a5065da86cdd8510 /src/internal-server/app/Controllers/Http/RecipeController.js | |
parent | 6.0.1-nightly.3 [skip ci] (diff) | |
download | ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.gz ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.zst ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.zip |
eslint needs to be executed at the top-level to actually workv6.0.1-nightly.3
Diffstat (limited to 'src/internal-server/app/Controllers/Http/RecipeController.js')
-rw-r--r-- | src/internal-server/app/Controllers/Http/RecipeController.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/internal-server/app/Controllers/Http/RecipeController.js b/src/internal-server/app/Controllers/Http/RecipeController.js index eac34aa5c..61fa6be8f 100644 --- a/src/internal-server/app/Controllers/Http/RecipeController.js +++ b/src/internal-server/app/Controllers/Http/RecipeController.js | |||
@@ -4,7 +4,9 @@ const { validateAll } = use('Validator'); | |||
4 | const Env = use('Env'); | 4 | const Env = use('Env'); |
5 | 5 | ||
6 | const fetch = require('node-fetch'); | 6 | const fetch = require('node-fetch'); |
7 | const debug = require('../../../../preload-safe-debug')('Ferdium:internalServer:RecipeController'); | 7 | const debug = require('../../../../preload-safe-debug')( |
8 | 'Ferdium:internalServer:RecipeController', | ||
9 | ); | ||
8 | const { LIVE_FERDIUM_API } = require('../../../../config'); | 10 | const { LIVE_FERDIUM_API } = require('../../../../config'); |
9 | const { convertToJSON } = require('../../../../jsUtils'); | 11 | const { convertToJSON } = require('../../../../jsUtils'); |
10 | const { API_VERSION } = require('../../../../environment-remote'); | 12 | const { API_VERSION } = require('../../../../environment-remote'); |
@@ -87,15 +89,11 @@ class RecipeController { | |||
87 | } | 89 | } |
88 | 90 | ||
89 | // Return an empty array | 91 | // Return an empty array |
90 | update({ | 92 | update({ response }) { |
91 | response, | ||
92 | }) { | ||
93 | return response.send([]); | 93 | return response.send([]); |
94 | } | 94 | } |
95 | 95 | ||
96 | async popularRecipes({ | 96 | async popularRecipes({ response }) { |
97 | response, | ||
98 | }) { | ||
99 | const recipesUrlFetch = await fetch(`${RECIPES_URL}/popular`); | 97 | const recipesUrlFetch = await fetch(`${RECIPES_URL}/popular`); |
100 | const featuredRecipes = convertToJSON(await recipesUrlFetch.text()); | 98 | const featuredRecipes = convertToJSON(await recipesUrlFetch.text()); |
101 | return response.send(featuredRecipes); | 99 | return response.send(featuredRecipes); |