misc small bug-fixes

This commit is contained in:
Curtis SerVaas
2014-08-20 13:23:43 -07:00
parent 411a15d39d
commit ecbdca040d
8 changed files with 302 additions and 301 deletions
+7 -1
View File
@@ -1,4 +1,5 @@
var mongoose = require('mongoose');
var _ = require("underscore");
var NodeSchema = new mongoose.Schema({
text: {type: String},
@@ -132,7 +133,7 @@ function removeNode(thisId, thisIndex, parId, authorId){
delNode.save();
}
else{ //this is the condition that we'll have to take care of if there are dups.
delNode.parents = _.without(parents, parId);
delNode.parents = _.without(delNode.parents, parId);
delNode.save();
}
})
@@ -150,6 +151,11 @@ function updateText(id, newText, authorId){
});
}
function updateParent(parId, newId ,newIndex,now){
MyNode.findById(parId, null, function(err, parNode){
if(err || parNode == null){