This commit is contained in:
Adria Navarro 2024-01-04 15:42:16 +01:00
parent 906943d023
commit 6df4bf84df
2 changed files with 4 additions and 7 deletions

View File

@ -57,17 +57,14 @@ async function getAndMergeDatasource(datasource: Datasource) {
async function buildSchemaHelper(datasource: Datasource): Promise<Schema> {
const connector = (await getConnector(datasource)) as DatasourcePlus
return await connector.buildSchema(
datasource._id!,
datasource.entities! as Record<string, Table>
)
return await connector.buildSchema(datasource._id!, datasource.entities!)
}
async function buildFilteredSchema(
datasource: Datasource,
filter?: string[]
): Promise<Schema> {
let schema = await buildSchemaHelper(datasource)
const schema = await buildSchemaHelper(datasource)
if (!filter) {
return schema
}

View File

@ -362,8 +362,8 @@ class PostgresIntegration extends Sql implements DatasourcePlus {
})
}
let finalizedTables = finaliseExternalTables(tables, entities)
let errors = checkExternalTables(finalizedTables)
const finalizedTables = finaliseExternalTables(tables, entities)
const errors = checkExternalTables(finalizedTables)
return { tables: finalizedTables, errors }
} catch (err) {
// @ts-ignore