This commit is contained in:
raluca-elena 2014-08-07 20:18:10 +00:00
Родитель 2f8c7ef964
Коммит 5fd205ace4
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -12,7 +12,7 @@
<script src="./superagent.js"></script>
<script src="rot.js">
</script>
<script src="anotherApp.js">
<script src="app.js">
</script>
<div style="display: inline-flex;">
<div>

Просмотреть файл

@ -184,15 +184,18 @@ function getFeatures(cb) {
function setTag(uuid, feature, tag, cb) {
console.log("in setTag(uuid:", uuid, ", feature:", feature, ", tag:", tag, ")");
console.log("allFeatures[uuid][feature] is-------------------------- ", allFeatures[uuid][feature]);
console.log("allFeatures[uuid]", allFeatures[uuid]);
console.log("allFeatures[uuid]*******************", JSON.parse(allFeatures[uuid])[feature]);
//console.log("allFeatures[uuid][feature] is-------------------------- ", allFeatures[uuid][feature]);
if (allFeatures[uuid] === undefined) {
cb("No such uuid: " + uuid + " :( in allFeatures:" + allFeatures);
} else if (allFeatures[uuid][feature] === undefined) {
} else if (JSON.parse(allFeatures[uuid])[feature] === undefined) {
cb("No such feature: " + feature + " for uuid: " + uuid + " :(");
} else if (tag in allTags) {
cb("Tag alread used: " + tag + " :(");
} else {
var url = allThings[uuid].localURL + "/tags/" + tag;
console.log("in SET TAG PUT(url)***************************", url);
superagent.put(url)
.send(feature)
.end(function(res){