Fix types
This commit is contained in:
parent
eaf7e399e7
commit
c3856a48aa
|
@ -1,4 +1,4 @@
|
|||
import { getDefinitions } from "../../integrations"
|
||||
import { getDefinition, getDefinitions } from "../../integrations"
|
||||
import { BBContext } from "@budibase/types"
|
||||
|
||||
export async function fetch(ctx: BBContext) {
|
||||
|
@ -7,7 +7,7 @@ export async function fetch(ctx: BBContext) {
|
|||
}
|
||||
|
||||
export async function find(ctx: BBContext) {
|
||||
const defs = await getDefinitions()
|
||||
const def = await getDefinition(ctx.params.type)
|
||||
ctx.body = def
|
||||
ctx.status = 200
|
||||
ctx.body = defs[ctx.params.type]
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ async function enrichDatasourceWithValues(datasource: Datasource) {
|
|||
{ onlyFound: true }
|
||||
) as Datasource
|
||||
const definition = await getDefinition(processed.source)
|
||||
processed.config = checkDatasourceTypes(definition, processed.config)
|
||||
processed.config = checkDatasourceTypes(definition!, processed.config)
|
||||
return {
|
||||
datasource: processed,
|
||||
envVars: env as Record<string, string>,
|
||||
|
|
Loading…
Reference in New Issue