mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
standardize on passing .query args as array (#356)
This commit is contained in:
@@ -1587,7 +1587,7 @@ class CallSession extends Emitter {
|
|||||||
const pp = this._pool.promise();
|
const pp = this._pool.promise();
|
||||||
try {
|
try {
|
||||||
this.logger.info({accountSid: this.accountSid}, 'performQueueWebhook: looking up account');
|
this.logger.info({accountSid: this.accountSid}, 'performQueueWebhook: looking up account');
|
||||||
const [r] = await pp.query(sqlRetrieveQueueEventHook, this.accountSid);
|
const [r] = await pp.query(sqlRetrieveQueueEventHook, [this.accountSid]);
|
||||||
if (0 === r.length) {
|
if (0 === r.length) {
|
||||||
this.logger.info({accountSid: this.accountSid}, 'performQueueWebhook: no webhook provisioned');
|
this.logger.info({accountSid: this.accountSid}, 'performQueueWebhook: no webhook provisioned');
|
||||||
this.queueEventHookRequestor = null;
|
this.queueEventHookRequestor = null;
|
||||||
|
|||||||
@@ -100,13 +100,13 @@ module.exports = (logger, srf) => {
|
|||||||
|
|
||||||
const lookupAccountDetails = async(account_sid) => {
|
const lookupAccountDetails = async(account_sid) => {
|
||||||
|
|
||||||
const [r] = await pp.query({sql: sqlAccountDetails, nestTables: true}, account_sid);
|
const [r] = await pp.query({sql: sqlAccountDetails, nestTables: true}, [account_sid]);
|
||||||
if (0 === r.length) throw new Error(`invalid accountSid: ${account_sid}`);
|
if (0 === r.length) throw new Error(`invalid accountSid: ${account_sid}`);
|
||||||
const [r2] = await pp.query(sqlSpeechCredentials, account_sid);
|
const [r2] = await pp.query(sqlSpeechCredentials, [account_sid]);
|
||||||
const speech = r2.map(speechMapper);
|
const speech = r2.map(speechMapper);
|
||||||
|
|
||||||
/* add service provider creds unless we have that vendor at the account level */
|
/* add service provider creds unless we have that vendor at the account level */
|
||||||
const [r3] = await pp.query(sqlSpeechCredentialsForSP, account_sid);
|
const [r3] = await pp.query(sqlSpeechCredentialsForSP, [account_sid]);
|
||||||
r3.forEach((s) => {
|
r3.forEach((s) => {
|
||||||
if (!speech.find((s2) => s2.vendor === s.vendor)) {
|
if (!speech.find((s2) => s2.vendor === s.vendor)) {
|
||||||
speech.push(speechMapper(s));
|
speech.push(speechMapper(s));
|
||||||
|
|||||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -9,7 +9,7 @@
|
|||||||
"version": "0.8.3",
|
"version": "0.8.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jambonz/db-helpers": "^0.7.10",
|
"@jambonz/db-helpers": "^0.8.1",
|
||||||
"@jambonz/http-health-check": "^0.0.1",
|
"@jambonz/http-health-check": "^0.0.1",
|
||||||
"@jambonz/realtimedb-helpers": "^0.7.2",
|
"@jambonz/realtimedb-helpers": "^0.7.2",
|
||||||
"@jambonz/speech-utils": "^0.0.13",
|
"@jambonz/speech-utils": "^0.0.13",
|
||||||
@@ -1595,9 +1595,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jambonz/db-helpers": {
|
"node_modules/@jambonz/db-helpers": {
|
||||||
"version": "0.7.10",
|
"version": "0.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.7.10.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.8.1.tgz",
|
||||||
"integrity": "sha512-wVZY7je6j01jZNmnzSiuhUz+ufeVEqh8WLi2RPiOJrNk3lFa6eNJJifCCzi5Z71zzIO8jEnDzj54rvbaFgaMtw==",
|
"integrity": "sha512-pc5TRAYnb89oyD5Ncy9Ik+v/tBqQcNOthbDwaX1OJyGRhPdolgs4YvOTpc0KpSqx7TDjKPS9n5MlqOFWgyDbTA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cidr-matcher": "^2.1.1",
|
"cidr-matcher": "^2.1.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
@@ -10053,9 +10053,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@jambonz/db-helpers": {
|
"@jambonz/db-helpers": {
|
||||||
"version": "0.7.10",
|
"version": "0.8.1",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.7.10.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/db-helpers/-/db-helpers-0.8.1.tgz",
|
||||||
"integrity": "sha512-wVZY7je6j01jZNmnzSiuhUz+ufeVEqh8WLi2RPiOJrNk3lFa6eNJJifCCzi5Z71zzIO8jEnDzj54rvbaFgaMtw==",
|
"integrity": "sha512-pc5TRAYnb89oyD5Ncy9Ik+v/tBqQcNOthbDwaX1OJyGRhPdolgs4YvOTpc0KpSqx7TDjKPS9n5MlqOFWgyDbTA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cidr-matcher": "^2.1.1",
|
"cidr-matcher": "^2.1.1",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"jslint:fix": "eslint app.js tracer.js lib --fix"
|
"jslint:fix": "eslint app.js tracer.js lib --fix"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jambonz/db-helpers": "^0.7.10",
|
"@jambonz/db-helpers": "^0.8.1",
|
||||||
"@jambonz/http-health-check": "^0.0.1",
|
"@jambonz/http-health-check": "^0.0.1",
|
||||||
"@jambonz/realtimedb-helpers": "^0.7.2",
|
"@jambonz/realtimedb-helpers": "^0.7.2",
|
||||||
"@jambonz/speech-utils": "^0.0.13",
|
"@jambonz/speech-utils": "^0.0.13",
|
||||||
|
|||||||
Reference in New Issue
Block a user