1
0
Fork 0
mirror of synced 2024-08-08 22:58:24 +12:00

Updating datasource controller to use SDK rather than calling through controllers.

This commit is contained in:
mike12345567 2023-10-18 18:58:58 +01:00
parent 25ad78a94e
commit 2d5818ae33

View file

@ -4,7 +4,6 @@ import {
getQueryParams, getQueryParams,
getTableParams, getTableParams,
} from "../../db/utils" } from "../../db/utils"
import { destroy as tableDestroy } from "./table/internal"
import { getIntegration } from "../../integrations" import { getIntegration } from "../../integrations"
import { invalidateDynamicVariables } from "../../threads/utils" import { invalidateDynamicVariables } from "../../threads/utils"
import { context, db as dbCore, events } from "@budibase/backend-core" import { context, db as dbCore, events } from "@budibase/backend-core"
@ -325,11 +324,7 @@ async function destroyInternalTablesBySourceId(datasourceId: string) {
// Destroy the tables. // Destroy the tables.
for (const table of datasourceTableDocs) { for (const table of datasourceTableDocs) {
await tableDestroy({ await sdk.tables.internal.destroy(table)
params: {
tableId: table._id,
},
})
} }
} }