Revert some changes and bugfixes

This commit is contained in:
2017-04-05 11:24:58 +02:00
parent efc2f1284d
commit ba5715c613
6 changed files with 19 additions and 20 deletions
+9 -10
View File
@@ -25,8 +25,6 @@ router.post('/device', function(req, res){
});
router.get('/device', function(req, res){
connection.query(
@@ -43,18 +41,11 @@ router.get('/device', function(req, res){
});
});
/* GET api listing. */
router.get('/', function(req, res) {
res.status(200);
res.send("{\"success\":\"true\"}");
});
router.get('/data', function(req, res) {
connection.query(
'SELECT TOE1`, time FROM measurement ORDER BY time DESC LIMIT 0,10',
'SELECT TOE1, time FROM measurement ORDER BY time DESC LIMIT 0,10',
function (error, results, fields) {
if (error) throw error;
@@ -69,4 +60,12 @@ router.get('/data', function(req, res) {
});
/* GET api listing. */
router.get('/', function(req, res) {
res.status(200);
res.send("{\"success\":\"true\"}");
});
module.exports = router;