|
|
@@ -687,7 +687,7 @@ module.exports = (crowi) => {
|
|
|
return res.apiv3({ isDefaultLogo, customizedLogoSrc });
|
|
|
});
|
|
|
|
|
|
- router.put('/customize-logo', loginRequiredStrictly, adminRequired, csrf, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
|
+ router.put('/customize-logo', loginRequiredStrictly, adminRequired, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
|
|
|
|
const {
|
|
|
isDefaultLogo, customizedLogoSrc,
|
|
|
@@ -713,7 +713,7 @@ module.exports = (crowi) => {
|
|
|
});
|
|
|
|
|
|
router.post('/upload-brand-logo', uploads.single('file'), loginRequiredStrictly,
|
|
|
- adminRequired, csrf, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
|
+ adminRequired, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
|
|
|
|
if (req.file == null) {
|
|
|
return res.apiv3Err(new ErrorV3('File error.', 'upload-brand-logo-failed'));
|
|
|
@@ -740,7 +740,6 @@ module.exports = (crowi) => {
|
|
|
let attachment;
|
|
|
try {
|
|
|
attachment = await attachmentService.createAttachment(file, req.user, null, AttachmentType.BRAND_LOGO);
|
|
|
- const isDefaultLogo = await crowi.configManager.getConfig('crowi', 'customize:isDefaultLogo');
|
|
|
const attachmentConfigParams = {
|
|
|
'customize:customizedLogoSrc': attachment.filePathProxied,
|
|
|
};
|
|
|
@@ -756,7 +755,7 @@ module.exports = (crowi) => {
|
|
|
});
|
|
|
|
|
|
router.delete('/delete-brand-logo', loginRequiredStrictly,
|
|
|
- adminRequired, csrf, async(req, res) => {
|
|
|
+ adminRequired, async(req, res) => {
|
|
|
|
|
|
const attachments = await Attachment.find({ attachmentType: AttachmentType.BRAND_LOGO });
|
|
|
|