diff --git a/backend/controllers/calls.js b/backend/controllers/calls.js index a1ca8bd..5b54a9b 100644 --- a/backend/controllers/calls.js +++ b/backend/controllers/calls.js @@ -56,13 +56,6 @@ async function get_calls(query, numResults, res) { async function build_filter(filter_type, code, start_time, direction, shortName, numResults, starred, res) { var filter = {}; var query = {}; - var FilterType = { - All: 0, - Talkgroup: 1, - Group: 2, - Unit: 3 - }; - if (start_time) { var start = new Date(start_time); @@ -77,10 +70,6 @@ async function build_filter(filter_type, code, start_time, direction, shortName, } } - /* - filter.len = { - $gte: -1.0 - };*/ var sort_order = {}; @@ -96,7 +85,10 @@ async function build_filter(filter_type, code, start_time, direction, shortName, query['direction'] = direction; query['sort_order'] = sort_order; - if (filter_type) { + query['filter'] = filter; + get_calls(query, numResults, res); + + /* if (filter_type) { if ((filter_type == "group") && code && (code.indexOf(',') == -1)) { let o_id try { @@ -140,16 +132,6 @@ async function build_filter(filter_type, code, start_time, direction, shortName, } } - if (filter_type == "unit") { - if (code) { - var codeArray = code.split(',').map(function (item) { - return parseInt(item, 10); - }); - filter.srcListv = { - $in: codeArray - }; - } - } query['filter'] = filter; get_calls(query, numResults, res); @@ -157,7 +139,7 @@ async function build_filter(filter_type, code, start_time, direction, shortName, } else { query['filter'] = filter; get_calls(query, numResults, res); - } + }*/ } diff --git a/backend/index.js b/backend/index.js index efefa93..ae391c0 100644 --- a/backend/index.js +++ b/backend/index.js @@ -96,7 +96,6 @@ function addSystemClients(req, res, next) { /*------ CALLS ----------*/ - app.get('/card/:id', calls.get_card); app.post('/add_star/:id', calls.add_star); app.post('/remove_star/:id', calls.remove_star);