1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Refactor plus selector

This commit is contained in:
Adria Navarro 2023-07-24 16:29:49 +02:00
parent c58b145afd
commit c870039416
2 changed files with 9 additions and 1 deletions

View file

@ -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.

View file

@ -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,
})
)