Skip to content

Commit

Permalink
Try to fix #7 again
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Shatokhin committed Sep 18, 2017
1 parent 8cfdda4 commit 16ae4f6
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions modules/statsapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,7 @@ getActionErrorInfo:function (t, p, cb) {
$facet: {
_id: [{
$group: {
_id: {
$cond: {if: ALL, then: "$_idp", else: "$ehash"
}
},
_id: ALL ? "$_idp" : "$ehash",
c: {$sum: 1}
}
}, {
Expand Down Expand Up @@ -570,7 +567,7 @@ getActionErrorInfo:function (t, p, cb) {
var tmpReporter = tmpData[0].reporter;
var tmpServer = tmpData[0].server;
var tmpLang = tmpData[0].lang;
var res = {route: [],server: [],reporter: [],lang: [],count: _.get(tmp_id, "c", 0)};
var res = {route: [],server: [],reporter: [],lang: [],count:tmp_id.c};
_.each(tmpRoute, function(v, k) {
if (v._id != null) {
res.route.push({k: v._id, v: v.c});
Expand Down Expand Up @@ -847,13 +844,7 @@ getPageErrorInfo:function (t, p, cb) {
$facet: {
_id: [{
$group: {
_id: {
$cond: {
if: ALL,
then: "$_idp",
else: "$ehash"
}
},
_id: ALL ? "$_idp" : "$ehash",
c: {$sum: 1}
}
}, {
Expand Down

0 comments on commit 16ae4f6

Please sign in to comment.