diff options
author | kytwb <kytwb@pm.me> | 2021-12-21 17:30:24 +0100 |
---|---|---|
committer | kytwb <kytwb@pm.me> | 2021-12-21 17:30:24 +0100 |
commit | b054bd77a89c75c6288841c524773888ca981dcb (patch) | |
tree | 0deef05f007d2934ff41b8ebae060d61a3ca4afd /src/internal-server | |
parent | 5.6.4 (diff) | |
parent | 5.6.5-nightly.5 [skip ci] (diff) | |
download | ferdium-app-b054bd77a89c75c6288841c524773888ca981dcb.tar.gz ferdium-app-b054bd77a89c75c6288841c524773888ca981dcb.tar.zst ferdium-app-b054bd77a89c75c6288841c524773888ca981dcb.zip |
Merge branch 'nightly' into release
Diffstat (limited to 'src/internal-server')
-rw-r--r-- | src/internal-server/app/Controllers/Http/RecipeController.js | 2 | ||||
-rw-r--r-- | src/internal-server/app/Controllers/Http/ServiceController.js | 1 |
2 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 7e35e6831..d7ca716bb 100644 --- a/src/internal-server/app/Controllers/Http/RecipeController.js +++ b/src/internal-server/app/Controllers/Http/RecipeController.js | |||
@@ -14,7 +14,7 @@ class RecipeController { | |||
14 | // List official and custom recipes | 14 | // List official and custom recipes |
15 | async list({ response }) { | 15 | async list({ response }) { |
16 | const recipesUrlFetch = await fetch(RECIPES_URL); | 16 | const recipesUrlFetch = await fetch(RECIPES_URL); |
17 | const officialRecipes = JSON.parse(await recipesUrlFetch).text(); | 17 | const officialRecipes = JSON.parse(await recipesUrlFetch.text()); |
18 | const allRecipes = await Recipe.all(); | 18 | const allRecipes = await Recipe.all(); |
19 | const customRecipesArray = allRecipes.rows; | 19 | const customRecipesArray = allRecipes.rows; |
20 | const customRecipes = customRecipesArray.map(recipe => ({ | 20 | const customRecipes = customRecipesArray.map(recipe => ({ |
diff --git a/src/internal-server/app/Controllers/Http/ServiceController.js b/src/internal-server/app/Controllers/Http/ServiceController.js index a3add4464..54cc69eb0 100644 --- a/src/internal-server/app/Controllers/Http/ServiceController.js +++ b/src/internal-server/app/Controllers/Http/ServiceController.js | |||
@@ -125,6 +125,7 @@ class ServiceController { | |||
125 | do { | 125 | do { |
126 | iconId = uuid() + uuid(); | 126 | iconId = uuid() + uuid(); |
127 | } while (fs.existsSync(path.join(Env.get('USER_PATH'), 'icons', iconId))); | 127 | } while (fs.existsSync(path.join(Env.get('USER_PATH'), 'icons', iconId))); |
128 | iconId = `${iconId}.${icon.extname}`; | ||
128 | 129 | ||
129 | await icon.move(path.join(Env.get('USER_PATH'), 'icons'), { | 130 | await icon.move(path.join(Env.get('USER_PATH'), 'icons'), { |
130 | name: iconId, | 131 | name: iconId, |