Revert some changes and bugfixes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user