|
|
@ -82,11 +82,7 @@ const selectedClient = ref<string | undefined>(langs[0].clients && langs[0].clie |
|
|
|
const selectedLangName = ref(langs[0].name) |
|
|
|
const selectedLangName = ref(langs[0].name) |
|
|
|
|
|
|
|
|
|
|
|
const apiUrl = computed( |
|
|
|
const apiUrl = computed( |
|
|
|
() => |
|
|
|
() => new URL(`/api/v2/tables/${meta.value?.id}/records`, (appInfo.value && appInfo.value.ncSiteUrl) || '/').href, |
|
|
|
new URL( |
|
|
|
|
|
|
|
`/api/v1/db/data/noco/${base.value?.id}/${meta.value?.id}/views/${view.value?.id}`, |
|
|
|
|
|
|
|
(appInfo.value && appInfo.value.ncSiteUrl) || '/', |
|
|
|
|
|
|
|
).href, |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const snippet = computed( |
|
|
|
const snippet = computed( |
|
|
@ -95,12 +91,15 @@ const snippet = computed( |
|
|
|
method: 'GET', |
|
|
|
method: 'GET', |
|
|
|
headers: [{ name: 'xc-auth', value: token.value, comment: 'JWT Auth token' }], |
|
|
|
headers: [{ name: 'xc-auth', value: token.value, comment: 'JWT Auth token' }], |
|
|
|
url: apiUrl.value, |
|
|
|
url: apiUrl.value, |
|
|
|
queryString: Object.entries(queryParams.value || {}).map(([name, value]) => { |
|
|
|
queryString: [ |
|
|
|
return { |
|
|
|
...Object.entries(queryParams.value || {}).map(([name, value]) => { |
|
|
|
name, |
|
|
|
return { |
|
|
|
value: String(value), |
|
|
|
name, |
|
|
|
} |
|
|
|
value: String(value), |
|
|
|
}), |
|
|
|
} |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
{ name: 'viewId', value: view.value?.id }, |
|
|
|
|
|
|
|
], |
|
|
|
}), |
|
|
|
}), |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|