Explorar o código

fix: use non-arrow function for listFiles

mizozobu %!s(int64=3) %!d(string=hai) anos
pai
achega
41f605000b

+ 1 - 1
packages/app/src/server/service/file-uploader/aws.ts

@@ -243,7 +243,7 @@ module.exports = (crowi) => {
   /**
    * List files in storage
    */
-  lib.listFiles = async() => {
+  lib.listFiles = async function() {
     if (!lib.getIsReadable()) {
       throw new Error('AWS is not configured.');
     }

+ 1 - 1
packages/app/src/server/service/file-uploader/gcs.js

@@ -187,7 +187,7 @@ module.exports = function(crowi) {
   /**
    * List files in storage
    */
-  lib.listFiles = async() => {
+  lib.listFiles = async function() {
     if (!this.getIsReadable()) {
       throw new Error('GCS is not configured.');
     }

+ 1 - 1
packages/app/src/server/service/file-uploader/gridfs.js

@@ -128,7 +128,7 @@ module.exports = function(crowi) {
   /**
    * List files in storage
    */
-  lib.listFiles = async() => {
+  lib.listFiles = async function() {
     const attachmentFiles = await AttachmentFile.find();
     return attachmentFiles.map(({ filename: name, length: size }) => ({
       name, size,

+ 1 - 1
packages/app/src/server/service/file-uploader/local.js

@@ -141,7 +141,7 @@ module.exports = function(crowi) {
   /**
    * List files in storage
    */
-  lib.listFiles = async() => {
+  lib.listFiles = async function() {
     // `mkdir -p` to avoid ENOENT error
     await mkdir(basePath);
     const filePaths = await readdirRecursively(basePath);

+ 1 - 1
packages/app/src/server/service/file-uploader/none.js

@@ -32,7 +32,7 @@ module.exports = function(crowi) {
   /**
    * List files in storage
    */
-  lib.listFiles = async() => {
+  lib.listFiles = async function() {
     debug('Listing files in storage');
     throw new Error('not implemented');
   };