You need to return a response to the caller. Once you override the success callback for the request.execute
function, the default behavior (returning a response to the caller) doesn't execute anymore. You likely need something along the lines of the code below.
function insert(item, user, request) {
item.createdDate = new Date();
item.updatedDate = new Date();
var node = { id: '',
textSize: 20,
backColor: 'Blue',
parentId: '' };
console.log('Root bubble initialized with default params: ', node);
request.execute( {
success: function() {
node.parentId = item.id;
var nodeTable = tables.getTable('Nodes');
nodeTable.insert(node, {
request.respond(statusCodes.CREATED, item);
});
}
});
}