Browse Source

Merge pull request #2961 from nocodb/refactor/remove-user-details

refactor: remove user context information from webhook panel
pull/2965/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
294ba0aa65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/nc-gui-v2/components/webhook/Editor.vue
  2. 2
      packages/nc-gui-v2/components/webhook/Test.vue

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

@ -576,14 +576,11 @@ onMounted(() => {
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div class="text-gray-600"> <div class="text-gray-600">
<em>Available context variables are <strong>data and user</strong></em> <em>Use context variable <strong>data</strong> to refer the record under consideration</em>
<a-tooltip bottom> <a-tooltip bottom>
<template #title> <template #title>
<span> <span> <strong>data</strong> : Row data <br /> </span>
<strong>data</strong> : Row data <br />
<strong>user</strong> : User information<br />
</span>
</template> </template>
<MdiInformationIcon class="ml-2" /> <MdiInformationIcon class="ml-2" />
</a-tooltip> </a-tooltip>

2
packages/nc-gui-v2/components/webhook/Test.vue

@ -18,7 +18,6 @@ const meta = inject(MetaInj)
const sampleData = ref({ const sampleData = ref({
data: {}, data: {},
user: {},
}) })
const activeKey = ref(0) const activeKey = ref(0)
@ -32,7 +31,6 @@ watch(
async function loadSampleData() { async function loadSampleData() {
sampleData.value = { sampleData.value = {
data: await $api.dbTableWebhook.samplePayloadGet(meta?.value?.id as string, hook?.operation), data: await $api.dbTableWebhook.samplePayloadGet(meta?.value?.id as string, hook?.operation),
user: $state.user.value as Record<string, any>,
} }
} }

Loading…
Cancel
Save