Test force json parse MoreInfo - Fase 2

pull/1/head
Jéluchu 5 years ago
parent e59e7e4806
commit 62121cbc53

@ -171,12 +171,11 @@ router.get('/moreInfo/:title' , (req, res) =>{
let title = req.params.title; let title = req.params.title;
api.getMoreInfo(title) api.getMoreInfo(title)
.then(data =>{ .then(info =>{
if (data.length > 0) { if (info.length > 0) {
let info = JSON.parse(JSON.stringify(data)) res.status(200).json(
res.status(200).json({ JSON.parse(JSON.stringify(info[0]))
info );
});
} else { res.status(400) } } else { res.status(400) }
}).catch((err) =>{ }).catch((err) =>{
console.error(err); console.error(err);

Loading…
Cancel
Save