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