minor tidy up
This commit is contained in:
parent
aabbbdecfe
commit
85887b7952
|
@ -18,8 +18,8 @@ validateJs.extend(validateJs.validators.datetime, {
|
||||||
|
|
||||||
exports.makeExternalQuery = async (appId, json) => {
|
exports.makeExternalQuery = async (appId, json) => {
|
||||||
const datasourceId = json.endpoint.datasourceId
|
const datasourceId = json.endpoint.datasourceId
|
||||||
const database = new CouchDB(appId)
|
const db = new CouchDB(appId)
|
||||||
const datasource = await database.get(datasourceId)
|
const datasource = await db.get(datasourceId)
|
||||||
const Integration = integrations[datasource.source]
|
const Integration = integrations[datasource.source]
|
||||||
// query is the opinionated function
|
// query is the opinionated function
|
||||||
if (Integration.prototype.query) {
|
if (Integration.prototype.query) {
|
||||||
|
|
|
@ -174,7 +174,6 @@ class PostgresIntegration extends Sql {
|
||||||
}
|
}
|
||||||
|
|
||||||
async query(json) {
|
async query(json) {
|
||||||
// TODO: get the schema
|
|
||||||
const operation = this._operation(json).toLowerCase()
|
const operation = this._operation(json).toLowerCase()
|
||||||
const input = this._query(json)
|
const input = this._query(json)
|
||||||
const response = await internalQuery(this.client, input)
|
const response = await internalQuery(this.client, input)
|
||||||
|
|
Loading…
Reference in New Issue