1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 18:32:50 +00:00

fixed api get request

This commit is contained in:
2015-12-18 15:05:58 -06:00
parent fcc553fe51
commit 73da2b5020

View File

@@ -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"},