update slack redirect + token missing check (#3179)

* update slack redirect + token missing check

* reset time
This commit is contained in:
pablodanswer 2024-11-20 13:42:54 -08:00 committed by GitHub
parent bf291d0c0a
commit 194dcb593d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -197,7 +197,9 @@ class SlackbotHandler:
return return
tokens_exist = tenant_bot_pair in self.slack_bot_tokens tokens_exist = tenant_bot_pair in self.slack_bot_tokens
tokens_changed = slack_bot_tokens != self.slack_bot_tokens[tenant_bot_pair] tokens_changed = (
tokens_exist and slack_bot_tokens != self.slack_bot_tokens[tenant_bot_pair]
)
if not tokens_exist or tokens_changed: if not tokens_exist or tokens_changed:
if tokens_exist: if tokens_exist:
logger.info( logger.info(

View File

@ -51,7 +51,7 @@ export const SlackTokensForm = ({
: "Successfully created Slack Bot!", : "Successfully created Slack Bot!",
type: "success", type: "success",
}); });
router.push(`/admin/bots/${botId}}`); router.push(`/admin/bots/${encodeURIComponent(botId)}`);
} else { } else {
const responseJson = await response.json(); const responseJson = await response.json();
const errorMsg = responseJson.detail || responseJson.message; const errorMsg = responseJson.detail || responseJson.message;