Просмотр исходного кода

Update isDefaultLogo value on customize logo update

https://youtrack.weseek.co.jp/issue/GW-7759
- Set isDefaultLogo true when update customize logo without upload image
- Keep isDefaultLogo unchanged on upload logo
mudana 3 лет назад
Родитель
Сommit
570cd39576

+ 1 - 1
packages/app/src/client/services/AdminCustomizeContainer.js

@@ -494,7 +494,7 @@ export default class AdminCustomizeContainer extends Container {
   async updateCustomizeLogo() {
     try {
       const response = await apiv3Put('/customize-setting/customize-logo', {
-        isDefaultLogo: this.state.isDefaultLogo,
+        isDefaultLogo: this.state.uploadedLogoSrc == null ? true : this.state.isDefaultLogo,
         brandLogoAttachmentId: this.state.brandLogoAttachmentId,
         uploadedLogoSrc: this.state.uploadedLogoSrc,
       });

+ 0 - 1
packages/app/src/server/routes/attachment.js

@@ -743,7 +743,6 @@ module.exports = function(crowi, app) {
       attachment = await attachmentService.createAttachment(file, req.user, null, attachmentType);
       const attachmentConfigParams = {
         'customize:brandLogoAttachmentId': attachment.id,
-        'customize:isDefaultLogo': false,
         'customize:uploadedLogoSrc': attachment.filePathProxied,
       };
       await crowi.configManager.updateConfigsInTheSameNamespace('crowi', attachmentConfigParams);