1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

Handle config

This commit is contained in:
Adria Navarro 2023-05-16 10:44:41 +02:00
parent cd93d327a5
commit a676e42b1f
2 changed files with 3 additions and 5 deletions

View file

@ -129,11 +129,9 @@ export async function verify(
) {
const { datasource } = ctx.request.body
const { config: { auth } = {} } = await sdk.datasources.get(datasource._id!)
const { config } = await sdk.datasources.get(datasource._id!)
const connector = await getConnector(
_.merge({ config: { auth } }, datasource)
)
const connector = await getConnector(_.merge(datasource, { config }))
if (!connector.testConnection) {
ctx.throw(400, "Connection information verification not supported")
}

View file

@ -9,7 +9,7 @@ export interface Datasource extends Document {
// the config is defined by the schema
config?: {
[key: string]: string | number | boolean | any[]
} & { auth?: object }
}
plus?: boolean
entities?: {
[key: string]: Table