mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-23 08:00:45 +00:00
fix: Workspace error handler creation was not adding the slack resource (#2733)
Co-authored-by: admin <admin@windmill.dev>
This commit is contained in:
committed by
GitHub
parent
0d93986b18
commit
70c504edfa
@@ -224,6 +224,9 @@
|
||||
|
||||
async function editErrorHandler() {
|
||||
if (errorHandlerScriptPath) {
|
||||
if (errorHandlerScriptPath !== undefined && isSlackHandler(errorHandlerScriptPath)) {
|
||||
errorHandlerExtraArgs['slack'] = '$res:f/slack_bot/bot_token'
|
||||
}
|
||||
await WorkspaceService.editErrorHandler({
|
||||
workspace: $workspaceStore!,
|
||||
requestBody: {
|
||||
@@ -245,6 +248,13 @@
|
||||
sendUserToast(`workspace error handler removed`)
|
||||
}
|
||||
}
|
||||
|
||||
function isSlackHandler(scriptPath: string) {
|
||||
return (
|
||||
scriptPath.startsWith('hub/') &&
|
||||
scriptPath.endsWith('/workspace-or-schedule-error-handler-slack')
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
<CenteredPage>
|
||||
|
||||
Reference in New Issue
Block a user