zahmis 5 лет назад
Родитель
Сommit
efe327145c
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      src/server/service/bolt.js

+ 3 - 3
src/server/service/bolt.js

@@ -91,12 +91,12 @@ class BoltService {
       const firstArg = inputSlack[0];
       const firstArg = inputSlack[0];
       const secondArg = inputSlack[1];
       const secondArg = inputSlack[1];
 
 
-      let paths;
+      let resultPaths;
       if (firstArg === 'search') {
       if (firstArg === 'search') {
         const { searchService } = this.crowi;
         const { searchService } = this.crowi;
         const option = { limit: 10 };
         const option = { limit: 10 };
         const searchResults = await searchService.searchKeyword(secondArg, null, {}, option);
         const searchResults = await searchService.searchKeyword(secondArg, null, {}, option);
-        paths = searchResults.data.map((data) => {
+        resultPaths = searchResults.data.map((data) => {
           return data._source.path;
           return data._source.path;
         });
         });
       }
       }
@@ -110,7 +110,7 @@ class BoltService {
             type: 'section',
             type: 'section',
             text: {
             text: {
               type: 'mrkdwn',
               type: 'mrkdwn',
-              text: `${paths.join('\n')}`,
+              text: `${resultPaths.join('\n')}`,
             },
             },
           }],
           }],
         });
         });