|
@@ -16,6 +16,18 @@ const CustomBotWithoutProxySettings = (props) => {
|
|
|
const [siteName, setSiteName] = useState('');
|
|
const [siteName, setSiteName] = useState('');
|
|
|
const [isDeleteConfirmModalShown, setIsDeleteConfirmModalShown] = useState(false);
|
|
const [isDeleteConfirmModalShown, setIsDeleteConfirmModalShown] = useState(false);
|
|
|
|
|
|
|
|
|
|
+ const fetchSlackIntegrationData = () => {
|
|
|
|
|
+ if (props.fetchSlackIntegrationData != null) {
|
|
|
|
|
+ props.fetchSlackIntegrationData();
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const onSetIsSetupSlackBot = () => {
|
|
|
|
|
+ if (props.onSetIsSetupSlackBot != null) {
|
|
|
|
|
+ props.onSetIsSetupSlackBot();
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const deleteSlackCredentialsHandler = async() => {
|
|
const deleteSlackCredentialsHandler = async() => {
|
|
|
try {
|
|
try {
|
|
|
await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
|
|
await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
|
|
@@ -23,8 +35,8 @@ const CustomBotWithoutProxySettings = (props) => {
|
|
|
slackBotToken: '',
|
|
slackBotToken: '',
|
|
|
currentBotType: 'customBotWithoutProxy',
|
|
currentBotType: 'customBotWithoutProxy',
|
|
|
});
|
|
});
|
|
|
- props.onSetIsSetupSlackBot(false);
|
|
|
|
|
- props.fetchSlackIntegrationData();
|
|
|
|
|
|
|
+ onSetIsSetupSlackBot(false);
|
|
|
|
|
+ fetchSlackIntegrationData();
|
|
|
toastSuccess('success');
|
|
toastSuccess('success');
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|