zahmis il y a 5 ans
Parent
commit
e3da7e3b65
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      src/server/service/bolt.js

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

@@ -75,11 +75,12 @@ class BoltService {
       await say(`${command.text}`);
     });
 
-    this.bolt.command('/growi-search', async({ command, ack, say }) => {
+    this.bolt.command('/growi', async({ command, ack, say }) => {
       const { searchService } = this.crowi;
-      const results = await searchService.searchKeyword(command.text, null, {}, {});
+      const option = { limit: 10 };
+      const results = await searchService.searchKeyword(command.text, null, {}, option);
       // get 10 result from slack input
-      console.log(results.data.slice(0, 10));
+      console.log(results.data);
     });
   }