Skip to content

Commit

Permalink
Fixed bad variables on the mongoose GET found on the router
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin7020 committed May 27, 2018
1 parent 6aee187 commit e8eecd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var Kmdata = require('./models/kmdata.js');
});

/*
*var kmdata = [ //OLD array to store messages
*var kmdata = [ //OLD DEV array to store messages
* { Kmetros: "1", litros: "2", precioT: "3", precioL: "4", fecha: "04/27/2018 10:43 PM" }
*]
*/
Expand All @@ -85,8 +85,10 @@ var Kmdata = require('./models/kmdata.js');
});

app.get('/kmdata', (req, res) =>{
Kmdata.find({}, (err, Kmdata) =>{
res.send(Kmdata)
})
//console.log(req.body) //Logs the incoming request to the console
res.send(kmdata)
})
};

Expand Down

0 comments on commit e8eecd4

Please sign in to comment.