Skip to content

Commit f966b23

Browse files
committed
Merge branch 'master' into flex
2 parents 38e3f98 + c76e938 commit f966b23

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

plugins/push/api/api-push.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ipc.attach();
9191

9292
/**
9393
* Process token session request
94-
*
94+
*
9595
* @param {Object} msg IPC message
9696
*/
9797
async function processTokenSession(msg) {
@@ -146,10 +146,10 @@ async function processTokenSession(msg) {
146146
});
147147
}, 10000);
148148
}
149-
else {
150-
appusersCollection.updateOne({_id: app_user_id}, {$unset: {[appusersField]: 1}}, function() {});
151-
pushCollection.updateOne({_id: uid}, {$unset: {[pushField]: 1}}, function() {});
152-
}
149+
// else {
150+
// appusersCollection.updateOne({_id: app_user_id}, {$unset: {[appusersField]: 1}}, function() {});
151+
// pushCollection.updateOne({_id: uid}, {$unset: {[pushField]: 1}}, function() {});
152+
// }
153153
}
154154

155155
module.exports.onTokenSession = async(dbAppUser, params) => {

plugins/server-stats/api/parts/stats.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ function fetchDatapoints(db, filter, options, callback) {
246246
if (options.monthlyBreakdown) {
247247
const dataPoints = result
248248
.reduce((acc, current) => {
249-
let dp = current.e + current.s;
249+
let dp = (current.e || 0) + (current.s || 0);
250250

251251
if (/^\[CLY\]_consolidated/.test(current._id)) {
252252
// do not count consolidated dp for countly hosted clients
@@ -415,4 +415,4 @@ function getAppName(appId, appNames) {
415415
}
416416

417417

418-
module.exports = {updateDataPoints, isConsolidated, increaseDataPoints, punchCard, fetchDatapoints, getTop, getAppName, internalEventsEnum};
418+
module.exports = {updateDataPoints, isConsolidated, increaseDataPoints, punchCard, fetchDatapoints, getTop, getAppName, internalEventsEnum};

0 commit comments

Comments
 (0)