mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-24 04:52:03 +00:00
wip
This commit is contained in:
@@ -12,6 +12,9 @@ class VoipCarrier extends Model {
|
||||
static _criteriaBuilder(obj, args) {
|
||||
let sql = '';
|
||||
if (obj.account_sid) {
|
||||
// carrier belong to an account when
|
||||
// 1. account_sid is set
|
||||
// 2. account_sid is null and service_provider_sid matches the account's service_provider_sid
|
||||
sql += ` AND (vc.account_sid = ? OR
|
||||
(vc.account_sid IS NULL AND vc.service_provider_sid IN
|
||||
(SELECT service_provider_sid FROM accounts WHERE account_sid = ?))
|
||||
|
||||
Reference in New Issue
Block a user