From 73da2b5020c80ff429e89c4270c8a2c06dcad5a0 Mon Sep 17 00:00:00 2001 From: mgerb42 Date: Fri, 18 Dec 2015 15:05:58 -0600 Subject: [PATCH] fixed api get request --- routes/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api.js b/routes/api.js index 10269ad..952ab70 100644 --- a/routes/api.js +++ b/routes/api.js @@ -9,9 +9,9 @@ var temperature = mongoose.model('temperature'); /* GET sensors page. */ router.get('/tempsensors', function(req, res, next) { - var location = request.query.location; + //var location = req.query.location; + - temperature.aggregate([ {$sort : {location : -1, updated : -1}}, { $group : { _id : {location : "$location", month: {$month: "$updated" }, day: { $dayOfMonth: "$updated" }, year: { $year: "$updated" }}, max : {$max : "$temperature"},