Handle config
This commit is contained in:
parent
cd93d327a5
commit
a676e42b1f
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue