Major Backend Single Responsibility Update part 1

This commit is contained in:
X4Lo committed 2025-01-25 04:29:42 +01:00
1 parent 65177c7553
commit cbdffb21e3
41 files changed
+1723 -888

No files matched your search

+3 -3
View File
@@ -1,7 +1,7 @@
const multer = require('multer');
const { v4: uuidv4 } = require('uuid');
const path = require('path');
const { getSettings } = require('./settingsService');
const configService = require('./configService');
// ? users
const entryPicturesUpload = multer({
@@ -12,7 +12,7 @@ const entryPicturesUpload = multer({
if (file.fieldname == 'backdrop') folder = 'backdrops';
if (file.fieldname == 'logo') folder = 'logos';
const dataPath = getSettings().userDataPath;
const dataPath = configService.getSettings().userDataPath;
cb(null, path.join(dataPath, 'images', 'entries', folder));
},
@@ -32,7 +32,7 @@ const collectionPicturesUpload = multer({
if (file.fieldname == 'backdrop') folder = 'backdrops';
if (file.fieldname == 'logo') folder = 'logos';
const dataPath = getSettings().userDataPath;
const dataPath = configService.getSettings().userDataPath;
cb(null, path.join(dataPath, 'images', 'collections', folder));
},