arvid-e 9 месяцев назад
Родитель
Сommit
169bcb5c54

+ 1 - 1
apps/app/src/server/routes/apiv3/content-disposition-settings.js

@@ -175,7 +175,7 @@ module.exports = (crowi) => {
         // Update the configuration in the database
         await configManager.updateConfigs({ [configKey]: isInline });
 
-        // Retrieve the updated value to send back in the response (best practice)
+        // Retrieve the updated value to send back in the response
         const updatedIsInline = await crowi.configManager.getConfig(configKey);
 
         const parameters = {

+ 3 - 4
apps/app/src/server/service/file-uploader/utils/headers.ts

@@ -21,21 +21,20 @@ export class ContentHeaders implements IContentHeaders {
 
   xContentTypeOptions?: ExpressHttpHeader<'X-Content-Type-Options'>;
 
-  private configManager: ConfigManager; // Now explicitly typed and assigned in constructor
+  private configManager: ConfigManager;
 
-  // Refactored: Make constructor private and have it accept configManager
   private constructor(configManager: ConfigManager) {
     this.configManager = configManager;
   }
 
-  // --- Factory Method (remains async) ---
   static async create(
-      configManager: ConfigManager, // This parameter is now passed to the private constructor
+      configManager: ConfigManager,
       attachment: IAttachmentDocument,
       opts?: {
       inline?: boolean,
     },
   ): Promise<ContentHeaders> {
+
     // Create instance, passing the configManager to the private constructor
     const instance = new ContentHeaders(configManager);