From fe4083a42443c5c72d9f01ea3ab4a9c183a77e1a Mon Sep 17 00:00:00 2001 From: raluca-elena Date: Thu, 14 Aug 2014 16:10:18 -0700 Subject: [PATCH] new version of rot --- frontend/lib/rotv2.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/lib/rotv2.js b/frontend/lib/rotv2.js index 0859e66..ebc846f 100644 --- a/frontend/lib/rotv2.js +++ b/frontend/lib/rotv2.js @@ -188,6 +188,14 @@ ROT.deleteTag = function deleteTag(tag, cb) { } }; +ROT.queryTags = function queryTags(tags, cb) { + // ["tag1", "tag2"], cb (resp, err)); where resp: {"tag1": ?, "tag2": ?} + var resp = {}; + for (var i = 0; i < tags.length; i++) { + resp[tags[i]] = allTags[tags[i]]; + } + cb(resp); // no error +}; function _isValidURL(url){ var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;