”2016-05-05”

This commit is contained in:
Martin Donnelly 2016-05-05 16:45:02 +01:00
parent 4281b3ca17
commit 7534eabe4a
2 changed files with 14 additions and 4 deletions

View File

@ -6,6 +6,8 @@
"instances" : 1,
"exec_mode" : "cluster",
"combine_logs" : true,
"max_memory_restart" : "150M",
"restart_delay" : 5000,
"ignore_watch" : ["[\\/\\\\]\\./", "node_modules", "server/static"]
}]
}

View File

@ -75,11 +75,19 @@ module.exports = function(app) {
dbPages.addNewPage(req.body.data)
.then(function(data) {
let response = {
data: data
};
dbPages.getPage(data.attributes.pid)
.then(function(data) {
let response = {
data: data
};
logger.debug(response);
res.status(200).send(response);
})
.catch((err)=> {
console.error(err);
res.status(401).end();
});
res.status(200).send(response);
eventHandler.emit('renderPage', data.attributes);
})