From 64067f51395101fbfbcd622811a40c6796ded812 Mon Sep 17 00:00:00 2001 From: raluca-elena Date: Wed, 13 Aug 2014 11:08:58 -0700 Subject: [PATCH] fix for free tags in writetag --- frontend/rot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/rot.js b/frontend/rot.js index 3aba028..33267b8 100644 --- a/frontend/rot.js +++ b/frontend/rot.js @@ -84,13 +84,15 @@ function readTag(tag, cb) { //this works only for http requests not for free tags function writeTag(tag, data, cb) { var tagData = allTags[tag]; + console.log("IN WRITE TAG and tagData is ", tagData); if (tagData === undefined) { cb(undefined, "No such tag: " + tag + " :("); } else if (tagData === undefined) { cb(undefined, "No url for tag: " + tag + " :("); - } else if (isValidURL("http://" +tagData)){ + } else if (isValidURL(tagData)){ //superagent.post("http://" + tagData) - var url = "http://" + tagData; + console.log("valid tag is:", tagData) + //var url = "http://" + tagData; superagent.put("http://" + tagData) .send(data) .end(function(res){