|
|
@@ -271,12 +271,13 @@ module.exports = (crowi) => {
|
|
|
* 200:
|
|
|
* description: Succeeded to put CustomBotWithoutProxy setting.
|
|
|
*/
|
|
|
- router.put('/without-proxy/update-settings', async(req, res) => {
|
|
|
+ router.put('/without-proxy/update-settings', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
|
|
|
const currentBotType = crowi.configManager.getConfig('crowi', 'slackbot:currentBotType');
|
|
|
if (currentBotType !== 'customBotWithoutProxy') {
|
|
|
const msg = 'Not CustomBotWithoutProxy';
|
|
|
return res.apiv3Err(new ErrorV3(msg, 'not-customBotWithoutProxy'), 400);
|
|
|
}
|
|
|
+
|
|
|
const { slackSigningSecret, slackBotToken } = req.body;
|
|
|
const requestParams = {
|
|
|
'slackbot:signingSecret': slackSigningSecret,
|
|
|
@@ -297,8 +298,6 @@ module.exports = (crowi) => {
|
|
|
logger.error('Error', error);
|
|
|
return res.apiv3Err(new ErrorV3(msg, 'update-CustomBotSetting-failed'), 500);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
});
|
|
|
|
|
|
|