Browse Source

fix(gui-v2): type casting in webhook list

pull/2838/head
Wing-Kam Wong 2 years ago
parent
commit
1a2ec5d2c0
  1. 7
      packages/nc-gui-v2/components/webhook/List.vue

7
packages/nc-gui-v2/components/webhook/List.vue

@ -11,13 +11,14 @@ const { $api, $e } = useNuxtApp()
const toast = useToast() const toast = useToast()
const hooks = ref([]) const hooks = ref<Record<string, any>[]>([])
const meta = inject(MetaInj) const meta = inject(MetaInj)
async function loadHooksList() { async function loadHooksList() {
try { try {
const hookList = (await $api.dbTableWebhook.list(meta?.value.id as string)).list as any const hookList = (await $api.dbTableWebhook.list(meta?.value.id as string)).list as Record<string, any>[]
hooks.value = hookList.map((hook: Record<string, any>) => { hooks.value = hookList.map((hook) => {
hook.notification = hook.notification && JSON.parse(hook.notification) hook.notification = hook.notification && JSON.parse(hook.notification)
return hook return hook
}) })

Loading…
Cancel
Save