diff options
author | 2019-09-25 20:58:25 +0200 | |
---|---|---|
committer | 2019-09-25 20:58:25 +0200 | |
commit | 80fa8e0971d2caf707e3abab29447948ba2ba9c7 (patch) | |
tree | 3cf18108fca671a0b1945ffdda0e80c4c29fc1dc /src/api | |
parent | Implement #75 (diff) | |
download | ferdium-app-80fa8e0971d2caf707e3abab29447948ba2ba9c7.tar.gz ferdium-app-80fa8e0971d2caf707e3abab29447948ba2ba9c7.tar.zst ferdium-app-80fa8e0971d2caf707e3abab29447948ba2ba9c7.zip |
Adding recipes as unpacked asset
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/server/ServerApi.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index 663c2716f..02f6b389d 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -13,9 +13,9 @@ import UserModel from '../../models/User'; | |||
13 | import OrderModel from '../../models/Order'; | 13 | import OrderModel from '../../models/Order'; |
14 | 14 | ||
15 | import { sleep } from '../../helpers/async-helpers'; | 15 | import { sleep } from '../../helpers/async-helpers'; |
16 | import { asarPath } from '../../helpers/asar-helpers'; | ||
17 | 16 | ||
18 | import { API } from '../../environment'; | 17 | import { API } from '../../environment'; |
18 | import { RECIPES_PATH } from '../../config'; | ||
19 | import apiBase from '../apiBase'; | 19 | import apiBase from '../apiBase'; |
20 | import { prepareAuthRequest, sendAuthRequest } from '../utils/auth'; | 20 | import { prepareAuthRequest, sendAuthRequest } from '../utils/auth'; |
21 | 21 | ||
@@ -372,8 +372,7 @@ export default class ServerApi { | |||
372 | const recipeTempDirectory = path.join(recipesDirectory, 'temp', recipeId); | 372 | const recipeTempDirectory = path.join(recipesDirectory, 'temp', recipeId); |
373 | const tempArchivePath = path.join(recipeTempDirectory, 'recipe.tar.gz'); | 373 | const tempArchivePath = path.join(recipeTempDirectory, 'recipe.tar.gz'); |
374 | 374 | ||
375 | const internalRecipesDirectory = asarPath(path.join(__dirname, '../../', 'recipes')); | 375 | const internalRecipeFile = path.join(RECIPES_PATH, `${recipeId}.tar.gz`); |
376 | const internalRecipeFile = path.join(internalRecipesDirectory, `${recipeId}.tar.gz`); | ||
377 | 376 | ||
378 | fs.ensureDirSync(recipeTempDirectory); | 377 | fs.ensureDirSync(recipeTempDirectory); |
379 | 378 | ||