diff --git a/backend/routes/routesToucan.js b/backend/routes/routesToucan.js index 9629837323ed6ba8f9e8b3342bb764c70639947d..f030712e415640c36adb57b88f2bba985c2fde01 100644 --- a/backend/routes/routesToucan.js +++ b/backend/routes/routesToucan.js @@ -172,20 +172,19 @@ router.get('/pdf/:urlId', (req, res) => { } }); -router.get('/pdf/url', (req, res) => { +router.get('/pdf/urlID', (req, res) => { try { - urltoucans. - exec((err,data) => { - if (err) { - console.log(err); + urltoucans.exec((err,data) => { + if (err) { + console.log(err); } else { - res.json(data); - }}); - } catch (err) { - console.log(err); - res.sendStatus(401); - } - }); - + res.send(data); + }}); + } catch (err) { + console.log(err); + res.sendStatus(401); + } + }); + module.exports = router; \ No newline at end of file