Major Backend Single Responsibility Update part 1
This commit is contained in:
1 parent
65177c7553
commit
cbdffb21e3
41 files changed
+1723
-888
No files matched your search
@@ -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));
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user