|
@@ -18,12 +18,13 @@ const SlackIntegration = (props) => {
|
|
|
const fetchData = useCallback(async() => {
|
|
const fetchData = useCallback(async() => {
|
|
|
try {
|
|
try {
|
|
|
const response = await appContainer.apiv3.get('slack-integration/');
|
|
const response = await appContainer.apiv3.get('slack-integration/');
|
|
|
- setCurrentBotType(response.currentBotType);
|
|
|
|
|
|
|
+ const { currentBotType } = response.data.slackBotSettingParams;
|
|
|
|
|
+ setCurrentBotType(currentBotType);
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|
|
|
toastError(err);
|
|
toastError(err);
|
|
|
}
|
|
}
|
|
|
- }, [appContainer]);
|
|
|
|
|
|
|
+ }, [appContainer.apiv3]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
fetchData();
|
|
fetchData();
|
|
@@ -34,7 +35,7 @@ const SlackIntegration = (props) => {
|
|
|
await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
|
|
await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
|
|
|
slackSigningSecret: '',
|
|
slackSigningSecret: '',
|
|
|
slackBotToken: '',
|
|
slackBotToken: '',
|
|
|
- botType: '',
|
|
|
|
|
|
|
+ botType: selectedBotType,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|