1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +00:00

fixed api get request

This commit is contained in:
2015-12-18 15:05:58 -06:00
parent c0feb04bb3
commit 01f400ad1f

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