mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 17:27:37 -05:00
might have fixed it
This commit is contained in:
@@ -25,7 +25,7 @@ async function get_calls(query, numResults, res) {
|
|||||||
|
|
||||||
const sort = { length: -1 };
|
const sort = { length: -1 };
|
||||||
try {
|
try {
|
||||||
const items = await Call.find(query.filter, fields).sort(sort).limit(numResults);
|
const items = await Call.find(query.filter, fields).sort(query.sort_order).limit(numResults);
|
||||||
for (var i=0; i < items.length; i++) {
|
for (var i=0; i < items.length; i++) {
|
||||||
const item = items[i];
|
const item = items[i];
|
||||||
call = {
|
call = {
|
||||||
@@ -85,10 +85,9 @@ async function build_filter(filter_type, code, start_time, direction, shortName,
|
|||||||
query['direction'] = direction;
|
query['direction'] = direction;
|
||||||
query['sort_order'] = sort_order;
|
query['sort_order'] = sort_order;
|
||||||
|
|
||||||
query['filter'] = filter;
|
|
||||||
get_calls(query, numResults, res);
|
|
||||||
|
|
||||||
/* if (filter_type) {
|
|
||||||
|
if (filter_type) {
|
||||||
if ((filter_type == "group") && code && (code.indexOf(',') == -1)) {
|
if ((filter_type == "group") && code && (code.indexOf(',') == -1)) {
|
||||||
let o_id
|
let o_id
|
||||||
try {
|
try {
|
||||||
@@ -139,7 +138,7 @@ async function build_filter(filter_type, code, start_time, direction, shortName,
|
|||||||
} else {
|
} else {
|
||||||
query['filter'] = filter;
|
query['filter'] = filter;
|
||||||
get_calls(query, numResults, res);
|
get_calls(query, numResults, res);
|
||||||
}*/
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user