minor tidy up

This commit is contained in:
Martin McKeaveney 2021-06-16 15:54:14 +01:00
parent aabbbdecfe
commit 85887b7952
2 changed files with 2 additions and 3 deletions

View File

@ -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) {

View File

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