Commit 1958d58e authored by Daniel Teixeira's avatar Daniel Teixeira
Browse files

adding total in dataset

parent 19b8cbc2
......@@ -126,7 +126,6 @@ function checkResultAndGetResponse(params, samples, countTotal) {
if (samples && samples.length > 0) { // a value was found by mongodb
responseResource.observed = samples.length;
responseResource.NOT_BEACON_totalInDataSet = countTotal;
var matchedSegments = samples.map(function (s) { return checkResult(params, s)});
if (!matchedSegments || !matchedSegments[0] || !matchedSegments[0].matchedSegment) {
......
......@@ -57,6 +57,7 @@ router.get('/v0.2/query/', function (req, res) {
req.db.samples.find(mongoQuery, {}, function (err, docs){
var response = beacon.checkResultAndGetResponse(req.query, docs, count);
response.NOT_BEACON_totalInDataSet = count;
res.json(response);
});
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment