Browse Source

refactor: bring back `db` in meta api path

pull/6644/head
Pranav C 1 year ago
parent
commit
bb1ae43faa
  1. 10
      packages/nc-gui/components/dlg/AirtableImport.vue
  2. 2
      packages/nc-gui/components/general/HelpAndSupport.vue

10
packages/nc-gui/components/dlg/AirtableImport.vue

@ -125,14 +125,14 @@ async function createOrUpdate() {
const { id, ...payload } = syncSource.value
if (id !== '') {
await $fetch(`/api/v1/meta/syncs/${id}`, {
await $fetch(`/api/v1/db/meta/syncs/${id}`, {
baseURL,
method: 'PATCH',
headers: { 'xc-auth': $state.token.value as string },
body: payload,
})
} else {
syncSource.value = await $fetch(`/api/v1/meta/bases/${baseId}/syncs/${sourceId}`, {
syncSource.value = await $fetch(`/api/v1/db/meta/bases/${baseId}/syncs/${sourceId}`, {
baseURL,
method: 'POST',
headers: { 'xc-auth': $state.token.value as string },
@ -184,7 +184,7 @@ async function listenForUpdates() {
}
async function loadSyncSrc() {
const data: any = await $fetch(`/api/v1/meta/bases/${baseId}/syncs/${sourceId}`, {
const data: any = await $fetch(`/api/v1/db/meta/bases/${baseId}/syncs/${sourceId}`, {
baseURL,
method: 'GET',
headers: { 'xc-auth': $state.token.value as string },
@ -226,7 +226,7 @@ async function loadSyncSrc() {
async function sync() {
try {
await $fetch(`/api/v1/meta/syncs/${syncSource.value.id}/trigger`, {
await $fetch(`/api/v1/db/meta/syncs/${syncSource.value.id}/trigger`, {
baseURL,
method: 'POST',
headers: { 'xc-auth': $state.token.value as string },
@ -245,7 +245,7 @@ async function abort() {
"This is a highly experimental feature and only marks job as not started, please don't abort the job unless you are sure job is stuck.",
onOk: async () => {
try {
await $fetch(`/api/v1/meta/syncs/${syncSource.value.id}/abort`, {
await $fetch(`/api/v1/db/meta/syncs/${syncSource.value.id}/abort`, {
baseURL,
method: 'POST',
headers: { 'xc-auth': $state.token.value as string },

2
packages/nc-gui/components/general/HelpAndSupport.vue

@ -10,7 +10,7 @@ const { base } = storeToRefs(useBase())
const route = useRoute()
const openSwaggerLink = () => {
openLink(`./api/v1/meta/bases/${route.params.baseId}/swagger`, appInfo.value.ncSiteUrl)
openLink(`./api/v1/db/meta/bases/${route.params.baseId}/swagger`, appInfo.value.ncSiteUrl)
}
</script>

Loading…
Cancel
Save