Browse Source

fix(gui-v2): webhook saving type

pull/2838/head
Wing-Kam Wong 2 years ago
parent
commit
311708ed0f
  1. 34
      packages/nc-gui-v2/components/webhook/Editor.vue

34
packages/nc-gui-v2/components/webhook/Editor.vue

@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { Form } from 'ant-design-vue' import { Form } from 'ant-design-vue'
import { useToast } from 'vue-toastification' import { useToast } from 'vue-toastification'
import { PluginType } from 'nocodb-sdk'
import { MetaInj } from '~/context' import { MetaInj } from '~/context'
import MdiContentSaveIcon from '~icons/mdi/content-save' import MdiContentSaveIcon from '~icons/mdi/content-save'
import MdiLinkIcon from '~icons/mdi/link' import MdiLinkIcon from '~icons/mdi/link'
@ -339,23 +338,24 @@ async function saveHooks() {
try { try {
let res let res
if (hook.id) { if (hook.id) {
// TODO: fix me res = await $api.dbTableWebhook.update(hook.id, {
// res = await $api.dbTableWebhook.update(hook.id, { ...hook,
// ...hook, notification: {
// notification: { ...hook.notification,
// ...hook.notification, payload: hook.notification.payload,
// payload: hook.notification.payload, },
// }, } as any)
// })
} else { } else {
// TODO: fix me res = await $api.dbTableWebhook.create(
// res = await $api.dbTableWebhook.create(meta?.value.id as string, { meta?.value.id as string,
// ...hook, {
// notification: { ...hook,
// ...hook.notification, notification: {
// payload: hook.notification.payload, ...hook.notification,
// }, payload: hook.notification.payload,
// }) },
} as any,
)
} }
if (!hook.id && res) { if (!hook.id && res) {

Loading…
Cancel
Save