mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 12:56:40 +00:00
fix: airtable import with app ID
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
@@ -57,6 +57,7 @@ const syncSource = ref({
|
||||
syncDirection: 'Airtable to NocoDB',
|
||||
syncRetryCount: 1,
|
||||
apiKey: '',
|
||||
appId: '',
|
||||
shareId: '',
|
||||
syncSourceUrlOrId: '',
|
||||
options: {
|
||||
@@ -158,7 +159,8 @@ async function loadSyncSrc() {
|
||||
if (srcs && srcs[0]) {
|
||||
srcs[0].details = srcs[0].details || {}
|
||||
syncSource.value = migrateSync(srcs[0])
|
||||
syncSource.value.details.syncSourceUrlOrId = srcs[0].details.shareId
|
||||
syncSource.value.details.syncSourceUrlOrId =
|
||||
srcs[0].details.appId && srcs[0].details.appId.length > 0 ? srcs[0].details.syncSourceUrlOrId : srcs[0].details.shareId
|
||||
$jobs.subscribe({ syncId: syncSource.value.id }, onSubscribe, onStatus, onLog)
|
||||
} else {
|
||||
syncSource.value = {
|
||||
@@ -169,6 +171,7 @@ async function loadSyncSrc() {
|
||||
syncDirection: 'Airtable to NocoDB',
|
||||
syncRetryCount: 1,
|
||||
apiKey: '',
|
||||
appId: '',
|
||||
shareId: '',
|
||||
syncSourceUrlOrId: '',
|
||||
options: {
|
||||
@@ -242,6 +245,8 @@ watch(
|
||||
if (syncSource.value.details) {
|
||||
const m = v && v.match(/(exp|shr).{14}/g)
|
||||
syncSource.value.details.shareId = m ? m[0] : ''
|
||||
const m2 = v && v.match(/(app).{14}/g)
|
||||
syncSource.value.details.appId = m2 ? m2[0] : ''
|
||||
}
|
||||
},
|
||||
)
|
||||
@@ -296,7 +301,7 @@ onMounted(async () => {
|
||||
<a-input
|
||||
v-model:value="syncSource.details.syncSourceUrlOrId"
|
||||
class="nc-input-shared-base"
|
||||
:placeholder="`${$t('labels.sharedBase')} ID / URL`"
|
||||
:placeholder="`${$t('labels.sharedBase')} URL`"
|
||||
size="large"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
Reference in New Issue
Block a user