Normalize to double quotes across all files with Prettier
This commit is contained in:
1 parent
73bff72cec
commit
a5659cf4c8
190 files changed
+9523
-8859
No files matched your search
@@ -1,67 +1,64 @@
|
||||
const multer = require('multer');
|
||||
const { v4: uuidv4 } = require('uuid');
|
||||
const path = require('path');
|
||||
const configService = require('./configService');
|
||||
const multer = require("multer");
|
||||
const { v4: uuidv4 } = require("uuid");
|
||||
const path = require("path");
|
||||
const configService = require("./configService");
|
||||
|
||||
// ? users
|
||||
const entryPicturesUpload = multer({
|
||||
storage:
|
||||
multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
let folder = 'posters';
|
||||
if (file.fieldname == 'backdrop') folder = 'backdrops';
|
||||
if (file.fieldname == 'logo') folder = 'logos';
|
||||
storage: multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
let folder = "posters";
|
||||
if (file.fieldname == "backdrop") folder = "backdrops";
|
||||
if (file.fieldname == "logo") folder = "logos";
|
||||
|
||||
const dataPath = configService.getSettings().userDataPath;
|
||||
const dataPath = configService.getSettings().userDataPath;
|
||||
|
||||
cb(null, path.join(dataPath, 'images', 'entries', folder));
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
const uniqueFilename = uuidv4();
|
||||
const extension = file.originalname.split('.').pop();
|
||||
cb(null, `${uniqueFilename}.${extension}`);
|
||||
}
|
||||
})
|
||||
cb(null, path.join(dataPath, "images", "entries", folder));
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
const uniqueFilename = uuidv4();
|
||||
const extension = file.originalname.split(".").pop();
|
||||
cb(null, `${uniqueFilename}.${extension}`);
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
const collectionPicturesUpload = multer({
|
||||
storage:
|
||||
multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
let folder = 'posters';
|
||||
if (file.fieldname == 'backdrop') folder = 'backdrops';
|
||||
if (file.fieldname == 'logo') folder = 'logos';
|
||||
storage: multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
let folder = "posters";
|
||||
if (file.fieldname == "backdrop") folder = "backdrops";
|
||||
if (file.fieldname == "logo") folder = "logos";
|
||||
|
||||
const dataPath = configService.getSettings().userDataPath;
|
||||
const dataPath = configService.getSettings().userDataPath;
|
||||
|
||||
cb(null, path.join(dataPath, 'images', 'collections', folder));
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
const uniqueFilename = uuidv4();
|
||||
const extension = file.originalname.split('.').pop();
|
||||
cb(null, `${uniqueFilename}.${extension}`);
|
||||
}
|
||||
})
|
||||
cb(null, path.join(dataPath, "images", "collections", folder));
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
const uniqueFilename = uuidv4();
|
||||
const extension = file.originalname.split(".").pop();
|
||||
cb(null, `${uniqueFilename}.${extension}`);
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
const peoplePicturesUpload = multer({
|
||||
storage:
|
||||
multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
let folder = 'profiles';
|
||||
const dataPath = configService.getSettings().userDataPath;
|
||||
cb(null, path.join(dataPath, 'images', 'people', folder));
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
const uniqueFilename = uuidv4();
|
||||
const extension = file.originalname.split('.').pop();
|
||||
cb(null, `${uniqueFilename}.${extension}`);
|
||||
}
|
||||
})
|
||||
storage: multer.diskStorage({
|
||||
destination: function (req, file, cb) {
|
||||
let folder = "profiles";
|
||||
const dataPath = configService.getSettings().userDataPath;
|
||||
cb(null, path.join(dataPath, "images", "people", folder));
|
||||
},
|
||||
filename: function (req, file, cb) {
|
||||
const uniqueFilename = uuidv4();
|
||||
const extension = file.originalname.split(".").pop();
|
||||
cb(null, `${uniqueFilename}.${extension}`);
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
entryPicturesUpload,
|
||||
collectionPicturesUpload,
|
||||
peoplePicturesUpload,
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user