zahmis 5 năm trước cách đây
mục cha
commit
e3da7e3b65
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  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);
     });
   }