Browse Source

Merge pull request #5295 from nocodb/fix/webhook-missing-operation

fix(nc-gui): move eventOperation and onNotTypeChange logic out of loadPluginList
pull/5305/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
d103027a46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      packages/nc-gui/components/webhook/Editor.vue

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

@ -325,17 +325,11 @@ async function loadPluginList() {
...(p as any), ...(p as any),
} }
plugin.tags = p.tags ? p.tags.split(',') : [] plugin.tags = p.tags ? p.tags.split(',') : []
plugin.parsedInput = p.input && JSON.parse(p.input) plugin.parsedInput = typeof p.input === 'string' ? JSON.parse(p.input) : p.input
o[plugin.title] = plugin o[plugin.title] = plugin
return o return o
}, {} as Record<string, any>) }, {} as Record<string, any>)
if (hook.event && hook.operation) {
hook.eventOperation = `${hook.event} ${hook.operation}`
}
onNotTypeChange()
} catch (e: any) { } catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e)) message.error(await extractSdkResponseErrorMsg(e))
} }
@ -422,7 +416,15 @@ watch(
{ immediate: true }, { immediate: true },
) )
onMounted(loadPluginList) onMounted(async () => {
await loadPluginList()
if (hook.event && hook.operation) {
hook.eventOperation = `${hook.event} ${hook.operation}`
}
onNotTypeChange()
})
</script> </script>
<template> <template>

Loading…
Cancel
Save