diff options
Diffstat (limited to 'app/Controllers/Http/RecipeController.js')
-rw-r--r-- | app/Controllers/Http/RecipeController.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/Controllers/Http/RecipeController.js b/app/Controllers/Http/RecipeController.js index 6c8aa21..9bfd92e 100644 --- a/app/Controllers/Http/RecipeController.js +++ b/app/Controllers/Http/RecipeController.js | |||
@@ -35,7 +35,7 @@ class RecipeController { | |||
35 | const customRecipes = customRecipesArray.map((recipe) => ({ | 35 | const customRecipes = customRecipesArray.map((recipe) => ({ |
36 | id: recipe.recipeId, | 36 | id: recipe.recipeId, |
37 | name: recipe.name, | 37 | name: recipe.name, |
38 | ...typeof recipe.data === "string" ? JSON.parse(recipe.data) : recipe.data, | 38 | ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data, |
39 | })); | 39 | })); |
40 | 40 | ||
41 | const recipes = [ | 41 | const recipes = [ |
@@ -144,7 +144,7 @@ class RecipeController { | |||
144 | results = dbResults.map((recipe) => ({ | 144 | results = dbResults.map((recipe) => ({ |
145 | id: recipe.recipeId, | 145 | id: recipe.recipeId, |
146 | name: recipe.name, | 146 | name: recipe.name, |
147 | ...typeof recipe.data === "string" ? JSON.parse(recipe.data) : recipe.data, | 147 | ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data, |
148 | })); | 148 | })); |
149 | } else { | 149 | } else { |
150 | let remoteResults = []; | 150 | let remoteResults = []; |
@@ -155,7 +155,7 @@ class RecipeController { | |||
155 | const localResults = localResultsArray.map((recipe) => ({ | 155 | const localResults = localResultsArray.map((recipe) => ({ |
156 | id: recipe.recipeId, | 156 | id: recipe.recipeId, |
157 | name: recipe.name, | 157 | name: recipe.name, |
158 | ...typeof recipe.data === "string" ? JSON.parse(recipe.data) : recipe.data, | 158 | ...typeof recipe.data === 'string' ? JSON.parse(recipe.data) : recipe.data, |
159 | })); | 159 | })); |
160 | 160 | ||
161 | results = [ | 161 | results = [ |
@@ -194,7 +194,8 @@ class RecipeController { | |||
194 | // Check if recipe exists in recipes folder | 194 | // Check if recipe exists in recipes folder |
195 | if (await Drive.exists(`${service}.tar.gz`)) { | 195 | if (await Drive.exists(`${service}.tar.gz`)) { |
196 | return response.send(await Drive.get(`${service}.tar.gz`)); | 196 | return response.send(await Drive.get(`${service}.tar.gz`)); |
197 | } else if (Env.get('CONNECT_WITH_FRANZ') == 'true') { // eslint-disable-line eqeqeq | 197 | } |
198 | if (Env.get('CONNECT_WITH_FRANZ') == 'true') { // eslint-disable-line eqeqeq | ||
198 | return response.redirect(`https://api.franzinfra.com/v1/recipes/download/${service}`); | 199 | return response.redirect(`https://api.franzinfra.com/v1/recipes/download/${service}`); |
199 | } | 200 | } |
200 | return response.status(400).send({ | 201 | return response.status(400).send({ |