Refactor plus selector
This commit is contained in:
parent
c58b145afd
commit
c870039416
|
@ -186,6 +186,13 @@ export function getDatasourceParams(
|
||||||
return getDocParams(DocumentType.DATASOURCE, datasourceId, otherProps)
|
return getDocParams(DocumentType.DATASOURCE, datasourceId, otherProps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getDatasourcePlusParams(
|
||||||
|
datasourceId?: Optional,
|
||||||
|
otherProps?: { include_docs: boolean }
|
||||||
|
) {
|
||||||
|
return getDocParams(DocumentType.DATASOURCE_PLUS, datasourceId, otherProps)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a new query ID.
|
* Generates a new query ID.
|
||||||
* @returns {string} The new query ID which the query doc can be stored under.
|
* @returns {string} The new query ID which the query doc can be stored under.
|
||||||
|
|
|
@ -19,6 +19,7 @@ import _ from "lodash"
|
||||||
import {
|
import {
|
||||||
BudibaseInternalDB,
|
BudibaseInternalDB,
|
||||||
getDatasourceParams,
|
getDatasourceParams,
|
||||||
|
getDatasourcePlusParams,
|
||||||
getTableParams,
|
getTableParams,
|
||||||
} from "../../../db/utils"
|
} from "../../../db/utils"
|
||||||
import sdk from "../../index"
|
import sdk from "../../index"
|
||||||
|
@ -248,7 +249,7 @@ export async function getExternalDatasources(): Promise<Datasource[]> {
|
||||||
const db = context.getAppDB()
|
const db = context.getAppDB()
|
||||||
|
|
||||||
const externalDatasources = await db.allDocs<Datasource>(
|
const externalDatasources = await db.allDocs<Datasource>(
|
||||||
getDatasourceParams("plus", {
|
getDatasourcePlusParams(undefined, {
|
||||||
include_docs: true,
|
include_docs: true,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue