diff options
Diffstat (limited to 'src/internal-server/app/ImageHelper.js')
-rw-r--r-- | src/internal-server/app/ImageHelper.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/internal-server/app/ImageHelper.js b/src/internal-server/app/ImageHelper.js index e7c981a1d..905ba81ab 100644 --- a/src/internal-server/app/ImageHelper.js +++ b/src/internal-server/app/ImageHelper.js | |||
@@ -6,7 +6,7 @@ const path = require('path'); | |||
6 | const fs = require('fs-extra'); | 6 | const fs = require('fs-extra'); |
7 | const { API_VERSION } = require('../../environment-remote'); | 7 | const { API_VERSION } = require('../../environment-remote'); |
8 | 8 | ||
9 | const moveIcon = async (icon) => { | 9 | const moveIcon = async icon => { |
10 | const iconsPath = path.join(Env.get('USER_PATH'), 'icons'); | 10 | const iconsPath = path.join(Env.get('USER_PATH'), 'icons'); |
11 | await fs.ensureDir(iconsPath); | 11 | await fs.ensureDir(iconsPath); |
12 | 12 | ||
@@ -24,6 +24,11 @@ const moveIcon = async (icon) => { | |||
24 | return !icon.moved() ? '-1' : iconId; | 24 | return !icon.moved() ? '-1' : iconId; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | const deduceIconUrl = (iconId) => iconId ? `http://${Env.get('HOST')}:${Env.get('PORT')}/${API_VERSION}/icon/${iconId}` : null | 27 | const deduceIconUrl = iconId => |
28 | iconId | ||
29 | ? `http://${Env.get('HOST')}:${Env.get( | ||
30 | 'PORT', | ||
31 | )}/${API_VERSION}/icon/${iconId}` | ||
32 | : null; | ||
28 | 33 | ||
29 | module.exports = { moveIcon, deduceIconUrl }; | 34 | module.exports = { moveIcon, deduceIconUrl }; |