more comments
This commit is contained in:
Родитель
2f8c7ef964
Коммит
5fd205ace4
|
@ -12,7 +12,7 @@
|
||||||
<script src="./superagent.js"></script>
|
<script src="./superagent.js"></script>
|
||||||
<script src="rot.js">
|
<script src="rot.js">
|
||||||
</script>
|
</script>
|
||||||
<script src="anotherApp.js">
|
<script src="app.js">
|
||||||
</script>
|
</script>
|
||||||
<div style="display: inline-flex;">
|
<div style="display: inline-flex;">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -184,15 +184,18 @@ function getFeatures(cb) {
|
||||||
|
|
||||||
function setTag(uuid, feature, tag, cb) {
|
function setTag(uuid, feature, tag, cb) {
|
||||||
console.log("in setTag(uuid:", uuid, ", feature:", feature, ", tag:", tag, ")");
|
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) {
|
if (allFeatures[uuid] === undefined) {
|
||||||
cb("No such uuid: " + uuid + " :( in allFeatures:" + allFeatures);
|
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 + " :(");
|
cb("No such feature: " + feature + " for uuid: " + uuid + " :(");
|
||||||
} else if (tag in allTags) {
|
} else if (tag in allTags) {
|
||||||
cb("Tag alread used: " + tag + " :(");
|
cb("Tag alread used: " + tag + " :(");
|
||||||
} else {
|
} else {
|
||||||
var url = allThings[uuid].localURL + "/tags/" + tag;
|
var url = allThings[uuid].localURL + "/tags/" + tag;
|
||||||
|
console.log("in SET TAG PUT(url)***************************", url);
|
||||||
superagent.put(url)
|
superagent.put(url)
|
||||||
.send(feature)
|
.send(feature)
|
||||||
.end(function(res){
|
.end(function(res){
|
||||||
|
|
Загрузка…
Ссылка в новой задаче