Merge branch 'feature/environment-variables' of github.com:Budibase/budibase into feature/environment-variables
This commit is contained in:
commit
e803c422a3
|
@ -43,14 +43,7 @@ export async function get(
|
|||
export async function getWithEnvVars(datasourceId: string) {
|
||||
const appDb = context.getAppDB()
|
||||
const datasource = await appDb.get(datasourceId)
|
||||
const blocks = findHBSBlocks(JSON.stringify(datasource))
|
||||
const usesEnvVars =
|
||||
blocks.find(block => block.includes(ENV_VAR_PREFIX)) != null
|
||||
if (usesEnvVars) {
|
||||
return enrichDatasourceWithValues(datasource)
|
||||
} else {
|
||||
return datasource
|
||||
}
|
||||
return enrichDatasourceWithValues(datasource)
|
||||
}
|
||||
|
||||
export function isValid(datasource: Datasource) {
|
||||
|
|
Loading…
Reference in New Issue