diff --git a/server/viewinsert.js b/server/viewinsert.js index 3c13c2b..c570aec 100644 --- a/server/viewinsert.js +++ b/server/viewinsert.js @@ -4,24 +4,44 @@ var db_name = 'keeper'; var keeper = nano.use(db_name); keeper.destroy('_design/titles', function(err, body) { - if (!err) + if (error) { + console.log(error); + } else + { console.log(body); + } }); keeper.destroy('_design/reducedView', function(err, body) { - if (!err) + if (error) { + console.log(error); + } else + { console.log(body); + } }); keeper.destroy('_design/taglist', function(err, body) { - if (!err) + if (error) { + console.log(error); + } else + { console.log(body); + } }); keeper.destroy('_design/getAllTags', function(err, body) { - if (!err) + if (error) { + console.log(error); + } else + { console.log(body); + } }); keeper.destroy('_design/getTagByKey', function(err, body) { - if (!err) + if (error) { + console.log(error); + } else + { console.log(body); + } }); keeper.insert(