accept posted urls

This commit is contained in:
Martin Donnelly 2016-03-30 12:02:13 +01:00
parent 060c10b5ab
commit c0bc6df3e7

View File

@ -625,6 +625,19 @@ router.get('/new', function (req, res) {
}); });
router.post('/new', function (req, res) {
logger.debug('Posted Save new');
logger.info( req.body);
if (Object.keys(req.body).length !== 0)
{
busEmitter.emit("getBookmarkRes", req.body.url, res);
}
else {
res.status(422).end();
}
});
busEmitter.emit('updateTagsDB'); busEmitter.emit('updateTagsDB');
module.exports = router; module.exports = router;