Browse Source

refactor(nc-gui): channel type

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
2d3c416d26
  1. 5
      packages/nc-gui/components/webhook/Editor.vue

5
packages/nc-gui/components/webhook/Editor.vue

@ -223,10 +223,7 @@ const validators = computed(() => {
'notification.payload.subject': [fieldRequiredValidator()], 'notification.payload.subject': [fieldRequiredValidator()],
'notification.payload.body': [fieldRequiredValidator()], 'notification.payload.body': [fieldRequiredValidator()],
}), }),
...((hook.notification.type === 'Slack' || ...(['Slack', 'Microsoft Teams', 'Discord', 'Mattermost'].includes(hook.notification.type) && {
hook.notification.type === 'Microsoft Teams' ||
hook.notification.type === 'Discord' ||
hook.notification.type === 'Mattermost') && {
'notification.payload.channels': [fieldRequiredValidator()], 'notification.payload.channels': [fieldRequiredValidator()],
'notification.payload.body': [fieldRequiredValidator()], 'notification.payload.body': [fieldRequiredValidator()],
}), }),

Loading…
Cancel
Save