diff options
author | 2022-07-25 08:16:50 +0530 | |
---|---|---|
committer | 2022-07-25 08:17:10 +0530 | |
commit | cf282aa351cbc58691fb1b2fb4764830247cdbe8 (patch) | |
tree | 1a6ac4c9abd8b3de9d358016a5065da86cdd8510 /src/internal-server/app/ImageHelper.js | |
parent | 6.0.1-nightly.3 [skip ci] (diff) | |
download | ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.gz ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.zst ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.zip |
eslint needs to be executed at the top-level to actually workv6.0.1-nightly.3
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 }; |