Skip to content

Commit

Permalink
lookupAllVoipCarriers should not return carriers associated with inac…
Browse files Browse the repository at this point in the history
…tive accounts
  • Loading branch information
davehorton committed Jan 17, 2024
1 parent 300f8bc commit 5559a1c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/lookup-all-voip-carriers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const debug = require('debug')('jambonz:db-helpers');

const sql = 'SELECT * FROM voip_carriers';
// eslint-disable-next-line max-len
const sql = `SELECT * FROM voip_carriers
WHERE account_sid IS NULL
OR account_sid IN (SELECT account_sid FROM accounts WHERE is_active = 1)`;

/**
* Lookup all voip_carriers
Expand Down

0 comments on commit 5559a1c

Please sign in to comment.