bugfix: account returned when carrier default routing is used was wrong

This commit is contained in:
Dave Horton
2022-12-19 21:09:14 -05:00
parent faafaa8549
commit a9e79b23bd
+3 -1
View File
@@ -233,13 +233,15 @@ module.exports = (srf, logger) => {
}; };
} }
else if (accountLevelGateways.length === 1) { else if (accountLevelGateways.length === 1) {
const [accounts] = await pp.query('SELECT * from accounts where account_sid = ?',
accountLevelGateways[0].account_sid);
return { return {
fromCarrier: true, fromCarrier: true,
gateway: accountLevelGateways[0], gateway: accountLevelGateways[0],
service_provider_sid: accountLevelGateways[0].service_provider_sid, service_provider_sid: accountLevelGateways[0].service_provider_sid,
account_sid: accountLevelGateways[0].account_sid, account_sid: accountLevelGateways[0].account_sid,
application_sid: accountLevelGateways[0].application_sid, application_sid: accountLevelGateways[0].application_sid,
account: accountLevelGateways[0] account: accounts[0]
}; };
} }
else { else {