|
|
@@ -45,7 +45,9 @@ module.exports = (crowi) => {
|
|
|
body('botType').isString(),
|
|
|
],
|
|
|
SlackIntegration: [
|
|
|
- body('currentBotType').isString(),
|
|
|
+ body('currentBotType') === 'official-bot'
|
|
|
+ || body('currentBotType') === 'custom-bot-without-proxy'
|
|
|
+ || body('currentBotType') === 'custom-bot-with-proxy',
|
|
|
],
|
|
|
};
|
|
|
|
|
|
@@ -104,13 +106,13 @@ module.exports = (crowi) => {
|
|
|
const { currentBotType } = req.body;
|
|
|
|
|
|
const requestParams = {
|
|
|
- 'slackbot:currentBotType': currentBotType,
|
|
|
+ 'slackbot:type': currentBotType,
|
|
|
};
|
|
|
|
|
|
try {
|
|
|
await updateSlackBotSettings(requestParams);
|
|
|
const slackIntegrationSettingsParams = {
|
|
|
- currentBotType: crowi.configManager.getConfig('crowi', 'slackbot:currentBotType'),
|
|
|
+ currentBotType: crowi.configManager.getConfig('crowi', 'slackbot:type'),
|
|
|
};
|
|
|
return res.apiv3({ slackIntegrationSettingsParams });
|
|
|
}
|