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