diff options
author | 2021-08-23 09:34:46 +0530 | |
---|---|---|
committer | 2021-08-23 09:34:46 +0530 | |
commit | e5e50f4d7a8a24cb1061b563759108ffd0140825 (patch) | |
tree | 58df2e8fc2ee6ba3a0ef95cd7d8fc4032d95f4ce /src/internal-server/app/Controllers/Http/RecipeController.js | |
parent | 5.6.1-nightly.36 [skip ci] (diff) | |
download | ferdium-app-e5e50f4d7a8a24cb1061b563759108ffd0140825.tar.gz ferdium-app-e5e50f4d7a8a24cb1061b563759108ffd0140825.tar.zst ferdium-app-e5e50f4d7a8a24cb1061b563759108ffd0140825.zip |
refactor: Reuse constants and utility functions to remove hardcoding/duplication
Diffstat (limited to 'src/internal-server/app/Controllers/Http/RecipeController.js')
-rw-r--r-- | src/internal-server/app/Controllers/Http/RecipeController.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal-server/app/Controllers/Http/RecipeController.js b/src/internal-server/app/Controllers/Http/RecipeController.js index df889c7f4..1a7595a9d 100644 --- a/src/internal-server/app/Controllers/Http/RecipeController.js +++ b/src/internal-server/app/Controllers/Http/RecipeController.js | |||
@@ -8,8 +8,9 @@ const Env = use('Env'); | |||
8 | const fetch = require('node-fetch'); | 8 | const fetch = require('node-fetch'); |
9 | const debug = require('debug')('Ferdi:internalServer:RecipeController'); | 9 | const debug = require('debug')('Ferdi:internalServer:RecipeController'); |
10 | const { LIVE_FERDI_API } = require('../../../../config'); | 10 | const { LIVE_FERDI_API } = require('../../../../config'); |
11 | const { API_VERSION } = require('../../../../environment'); | ||
11 | 12 | ||
12 | const RECIPES_URL = `${LIVE_FERDI_API}/v1/recipes`; | 13 | const RECIPES_URL = `${LIVE_FERDI_API}/${API_VERSION}/recipes`; |
13 | 14 | ||
14 | class RecipeController { | 15 | class RecipeController { |
15 | // List official and custom recipes | 16 | // List official and custom recipes |