mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
Ready to go
This commit is contained in:
@@ -97,8 +97,19 @@ async function build_filter(filter_type, code, start_time, direction, shortName,
|
||||
|
||||
if (filter_type) {
|
||||
if ((filter_type == "group") && code && (code.indexOf(',') == -1)) {
|
||||
|
||||
|
||||
let o_id
|
||||
try {
|
||||
o_id = ObjectId.createFromHexString(code);
|
||||
} catch (err) {
|
||||
console.warn("[" + shortName + "] Error - build_filter() group ObjectId is invalid " + err + " id: " + code);
|
||||
res.contentType('json');
|
||||
res.status(500);
|
||||
res.send(JSON.stringify({
|
||||
error: err,
|
||||
"_id": objectId
|
||||
}));
|
||||
return;
|
||||
}
|
||||
|
||||
const group = await Group.findOne({ 'shortName': shortName, '_id': ObjectId.createFromHexString(code)}).exec();
|
||||
if (!group) {
|
||||
|
||||
Reference in New Issue
Block a user