diff --git a/lib/NGCP/Panel/Controller/API/Voicemails.pm b/lib/NGCP/Panel/Controller/API/Voicemails.pm index a5adc80710..edf6c33ab9 100644 --- a/lib/NGCP/Panel/Controller/API/Voicemails.pm +++ b/lib/NGCP/Panel/Controller/API/Voicemails.pm @@ -40,7 +40,7 @@ sub query_params { second => sub { }, }, }, - YYYY{ + { param => 'folder', description => 'Filter for voicemails in a specific folder (one of INBOX, Old, Friends, Family, Cust1 to Cust4)', query => { diff --git a/sandbox/api_fix_pbx_devices_profile_names.pl b/sandbox/api_fix_pbx_devices_profile_names.pl index 4b4b75ea6f..ead68d8292 100755 --- a/sandbox/api_fix_pbx_devices_profile_names.pl +++ b/sandbox/api_fix_pbx_devices_profile_names.pl @@ -12,7 +12,7 @@ my$test_collection = new Test::Collection( DEBUG => 1, ); $test_collection->DEBUG_ONLY(0); -my $profiles = $test_collection->get_collection_hal('pbxdeviceprofiles','/api/pbxdeviceprofiles/?name='.uri_escape('%two%')); +my $profiles = $test_collection->get_collection_hal('pbxdeviceprofiles','/api/pbxdeviceprofiles/?name='.uri_escape('*two*')); $test_collection->DEBUG_ONLY(1); if($profiles && $profiles->{total_count}){ foreach my $profile(@{$profiles->{collection}}){ @@ -27,7 +27,7 @@ if($profiles && $profiles->{total_count}){ $test_collection->name('pbxdevicemodels'); $test_collection->DEBUG_ONLY(0); -my $models = $test_collection->get_collection_hal('pbxdevicemodels','/api/pbxdevicemodels/?model='.uri_escape('%two%')); +my $models = $test_collection->get_collection_hal('pbxdevicemodels','/api/pbxdevicemodels/?model='.uri_escape('*two*')); $test_collection->DEBUG_ONLY(1); if($models && $models->{total_count}){ foreach my $model(@{$models->{collection}}){ diff --git a/t/api-rest/api-billingnetworks.t b/t/api-rest/api-billingnetworks.t index 30453d0470..802aae1054 100644 --- a/t/api-rest/api-billingnetworks.t +++ b/t/api-rest/api-billingnetworks.t @@ -171,7 +171,7 @@ done_testing; sub _filter_by_ip { my ($ip,$expected,$version) = @_; - $req = HTTP::Request->new('GET', $uri.'/api/billingnetworks/?page=1&rows=5&ip='.$ip.'&name='.URI::Escape::uri_escape('%').$t); + $req = HTTP::Request->new('GET', $uri.'/api/billingnetworks/?page=1&rows=5&ip='.$ip.'&name='.URI::Escape::uri_escape('*').$t); $res = $ua->request($req); is($res->code, 200, "filter for $version ip ".$ip); my $collection = JSON::from_json($res->decoded_content); diff --git a/t/api-rest/api-profilepackages.t b/t/api-rest/api-profilepackages.t index 323e265c03..973ef69cce 100644 --- a/t/api-rest/api-profilepackages.t +++ b/t/api-rest/api-profilepackages.t @@ -189,7 +189,7 @@ my %package_map = (); push(@profile_packages,_post_profile_package()); } - $req = HTTP::Request->new('GET', $uri.'/api/profilepackages/?page=1&rows=5&network_name='.URI::Escape::uri_escape('%')."network $t"); + $req = HTTP::Request->new('GET', $uri.'/api/profilepackages/?page=1&rows=5&network_name='.URI::Escape::uri_escape('*')."network $t"); $res = $ua->request($req); is($res->code, 200, "filter packages by network name"); my $collection = JSON::from_json($res->decoded_content); diff --git a/t/api-rest/api-soundsets.t b/t/api-rest/api-soundsets.t index 05b174cee9..14c70978d8 100644 --- a/t/api-rest/api-soundsets.t +++ b/t/api-rest/api-soundsets.t @@ -58,10 +58,10 @@ ok($filtered_by_reseller_correct->{total_count} > 0,"check that found soundsets my $filtered_by_reseller_wrong = $test_machine->get_collection_hal('soundsets', '/api/soundsets?reseller_id=9999999'); ok(!$filtered_by_reseller_wrong->{total_count},"check that not found soundsets of wrong reseller_id"); -my $filtered_by_name_correct = $test_machine->get_collection_hal('soundsets', '/api/soundsets?name=api_test%25'); +my $filtered_by_name_correct = $test_machine->get_collection_hal('soundsets', '/api/soundsets?name=api_test*'); ok($filtered_by_name_correct->{total_count} > 0,"check that found soundsets of name"); -my $filtered_by_name_wrong = $test_machine->get_collection_hal('soundsets', '/api/soundsets?name=api_test'); +my $filtered_by_name_wrong = $test_machine->get_collection_hal('soundsets', '/api/soundsets?name=x'); ok(!$filtered_by_name_wrong->{total_count},"check that not found soundsets of wrong name"); $test_machine->clear_test_data_all();