From 35316221bf4a54f2768996ac2b4e7f736e3dd2d7 Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Fri, 4 Dec 2020 15:47:39 +0200 Subject: [PATCH] TT#101300 /api/subscriberlocationmappings fix search by subscriber_id Change-Id: Ib2bd10d6537bf3267ee17a4fba16b25100748997 --- .../Panel/Controller/API/SubscriberLocationMappings.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm b/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm index 6b26da1fe8..ac76a10961 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm @@ -22,7 +22,15 @@ sub query_params { { param => 'subscriber_id', description => 'Filter for location mappings of a specific subscriber', - query_type => 'string_eq', + query => { + first => sub { + my $q = shift; + return { 'voip_subscriber.id' => $q }; + }, + second => sub { + return { join => { subscriber => 'voip_subscriber' } }; + }, + }, }, { param => 'external_id',