|
|
@ -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 |
|
|
|
}) |
|
|
|
}) |
|
|
|