aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/app/ImageHelper.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-25 08:16:50 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-25 08:17:10 +0530
commitcf282aa351cbc58691fb1b2fb4764830247cdbe8 (patch)
tree1a6ac4c9abd8b3de9d358016a5065da86cdd8510 /src/internal-server/app/ImageHelper.js
parent6.0.1-nightly.3 [skip ci] (diff)
downloadferdium-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.js9
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');
6const fs = require('fs-extra'); 6const fs = require('fs-extra');
7const { API_VERSION } = require('../../environment-remote'); 7const { API_VERSION } = require('../../environment-remote');
8 8
9const moveIcon = async (icon) => { 9const 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
27const deduceIconUrl = (iconId) => iconId ? `http://${Env.get('HOST')}:${Env.get('PORT')}/${API_VERSION}/icon/${iconId}` : null 27const deduceIconUrl = iconId =>
28 iconId
29 ? `http://${Env.get('HOST')}:${Env.get(
30 'PORT',
31 )}/${API_VERSION}/icon/${iconId}`
32 : null;
28 33
29module.exports = { moveIcon, deduceIconUrl }; 34module.exports = { moveIcon, deduceIconUrl };