MT#60845 /api/calllists add filter by duration

* new query params duration_ge and duration_le that enables
  filtering by the duration range.

Change-Id: I2425bfc97aeed4c74d13420d3c50c92211ef5fd5
mr13.5
Kirill Solomko 4 months ago
parent f7a3b1eab2
commit aeea350706

@ -283,6 +283,28 @@ sub query_params {
},
},
{
param => 'duration_ge',
description => 'Filter for calls with duration being greater or equal the specified value.',
query => {
first => sub {
my $q = shift;
{ 'me.duration' => { '>=' => $q } };
},
second => sub {},
},
},
{
param => 'duration_le',
description => 'Filter for calls with duration lower or equal the specified value.',
query => {
first => sub {
my $q = shift;
{ 'me.duration' => { '<=' => $q } };
},
second => sub {},
},
},
];
}

Loading…
Cancel
Save