|
@@ -80,16 +80,13 @@ class BoltService {
|
|
|
const inputSlack = command.text.split(' ');
|
|
const inputSlack = command.text.split(' ');
|
|
|
const firstArg = inputSlack[0];
|
|
const firstArg = inputSlack[0];
|
|
|
const secondArg = inputSlack[1];
|
|
const secondArg = inputSlack[1];
|
|
|
- await ack();
|
|
|
|
|
|
|
|
|
|
if (firstArg === 'search') {
|
|
if (firstArg === 'search') {
|
|
|
const { searchService } = this.crowi;
|
|
const { searchService } = this.crowi;
|
|
|
const option = { limit: 10 };
|
|
const option = { limit: 10 };
|
|
|
const results = await searchService.searchKeyword(secondArg, null, {}, option);
|
|
const results = await searchService.searchKeyword(secondArg, null, {}, option);
|
|
|
// get 10 result from slack input
|
|
// get 10 result from slack input
|
|
|
- // console.log(results.data[0]);
|
|
|
|
|
-
|
|
|
|
|
- await say(`${results.data[0]._id}`);
|
|
|
|
|
|
|
+ console.log(results.data);
|
|
|
}
|
|
}
|
|
|
return;
|
|
return;
|
|
|
});
|
|
});
|