mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 08:47:40 -05:00
adding num calls back
This commit is contained in:
@@ -382,6 +382,7 @@ exports.addNewEvent = async function (req, res, next) {
|
||||
event.startTime = new Date(calls[calls.length - 1].time);
|
||||
event.expireTime = new Date();
|
||||
event.expireTime.setDate(event.startTime.getDate() + 29);
|
||||
event.numCalls = calls.length;
|
||||
calls.forEach((call) => {
|
||||
if (event.shortNames.indexOf(call.shortName) === -1) {
|
||||
event.shortNames.push(call.shortName);
|
||||
|
||||
Reference in New Issue
Block a user