From 1885af6b7d9663d3932fb26b56ced1a43ff508bc Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Tue, 24 Nov 2020 14:03:42 +0100 Subject: [PATCH] TT#101300 add subscriber location mappings filter by external id Change-Id: I2363d615d1bc75fa33a2a512f2d8e3fc6d902aed --- .../API/SubscriberLocationMappings.pm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm b/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm index 34cb2865e2..6b26da1fe8 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberLocationMappings.pm @@ -22,17 +22,12 @@ sub query_params { { param => 'subscriber_id', description => 'Filter for location mappings of a specific subscriber', - query => { - first => sub { - my $q = shift; - return { 'voip_subscriber.id' => $q }; - }, - second => sub { - return { - join => { subscriber => 'voip_subscriber' } - }; - }, - }, + query_type => 'string_eq', + }, + { + param => 'external_id', + description => 'Filter for location mappings matching the provided external_id', + query_type => 'string_eq', }, ]; }