From aa624b3b01de024115fc0f3683e421a16a188389 Mon Sep 17 00:00:00 2001 From: Patrick McDonagh Date: Fri, 22 Jan 2016 14:29:24 -0600 Subject: [PATCH] Fixed get tag name and get tag id function names --- www/app.js | 4 ++-- www/functions_SQLite.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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);