TT#119464 Add start_time and end_time filter params to callrecordings

* the new filter params works as follows:
	  * if start_time is provided, recordings
	    with start time greater than provided value
	    are displayed
	  * if end_time is provided, recordings
	    with end time less than provided value
	    are displayed

Change-Id: Ie9cfb88141506581e2b724d4502b88091f9c7a02
mr9.5.1
Flaviu Mates 5 years ago
parent eb9a263e58
commit 43abaeee4d

@ -63,6 +63,36 @@ sub query_params {
}
},
},
{
param => 'start_time',
description => 'Filter for callrecordings made at a later date than provided datetime.',
query => {
first => sub {
my $q = shift;
if ($q) {
my $dt = NGCP::Panel::Utils::DateTime::from_string($q);
return { 'me.start_timestamp' => { '>=' => $dt->epoch } };
}
return {};
},
second => sub {},
},
},
{
param => 'end_time',
description => 'Filter for callrecordings made at an earlier date than provided datetime.',
query => {
first => sub {
my $q = shift;
if ($q) {
my $dt = NGCP::Panel::Utils::DateTime::from_string($q);
return { 'me.end_timestamp' => { '<=' => $dt->epoch } };
}
return {};
},
second => sub {},
},
},
];
}

Loading…
Cancel
Save