Browse Source

fix: use id instead of title in api snippet

pull/7230/head
Pranav C 11 months ago
parent
commit
c5fb56042e
  1. 8
      packages/nc-gui/components/smartsheet/details/Api.vue

8
packages/nc-gui/components/smartsheet/details/Api.vue

@ -84,7 +84,7 @@ const selectedLangName = ref(langs[0].name)
const apiUrl = computed( const apiUrl = computed(
() => () =>
new URL( new URL(
`/api/v1/db/data/noco/${base.value?.id}/${meta.value?.title}/views/${view.value?.title}`, `/api/v1/db/data/noco/${base.value?.id}/${meta.value?.id}/views/${view.value?.id}`,
(appInfo.value && appInfo.value.ncSiteUrl) || '/', (appInfo.value && appInfo.value.ncSiteUrl) || '/',
).href, ).href,
) )
@ -118,9 +118,9 @@ const api = new Api({
api.dbViewRow.list( api.dbViewRow.list(
"noco", "noco",
${JSON.stringify(base.value?.title)}, ${JSON.stringify(base.value?.id)},
${JSON.stringify(meta.value?.title)}, ${JSON.stringify(meta.value?.id)},
${JSON.stringify(view.value?.title)}, ${JSON.stringify(queryParams.value, null, 4)}).then(function (data) { ${JSON.stringify(view.value?.id)}, ${JSON.stringify(queryParams.value, null, 4)}).then(function (data) {
console.log(data); console.log(data);
}).catch(function (error) { }).catch(function (error) {
console.error(error); console.error(error);

Loading…
Cancel
Save