diff --git a/www/app.js b/www/app.js index fa2fe11..eca5d4b 100644 --- a/www/app.js +++ b/www/app.js @@ -63,8 +63,8 @@ var angular = function(req, res) { res.render('angularIndex'); }; -app.get('/json/get/id/:tagName', fns.tagID); // Gets the id for a tag name -app.get('/json/get/tagName/:tagID', fns.tagName); // Gets the tagName for an ID +app.get('/json/get/id/:tagName', fns.getTagID); // Gets the id for a tag name +app.get('/json/get/tagName/:tagID', fns.getTagName); // Gets the tagName for an ID app.get('/json/add/:tagName/:units', fns.addTag); // Adds a tag to the scan list app.get('/json/remove/:tag', fns.removeTag); // Removes a tag from the scan list app.get('/json/val/:tag', fns.latestTagValue); // Gets the latest value of a single tag diff --git a/www/functions_SQLite.js b/www/functions_SQLite.js index cf52d54..adb5871 100644 --- a/www/functions_SQLite.js +++ b/www/functions_SQLite.js @@ -47,7 +47,7 @@ var getTagName = function(tagID, cb){ }); }; -exports.tagID = function(req, res){ +exports.getTagID = function(req, res){ getTagID(req.params.tagName, function(err, id){ if (err){ console.log(err);