From cc45d7a97f5bd352bb24400de5fa916935740efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?In=C3=A8s=20Yeterian?= <ines.yeterian@student-cs.fr> Date: Sun, 16 Jan 2022 21:03:36 +0100 Subject: [PATCH] try to speak mangoose --- backend/routes/routesToucan.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/backend/routes/routesToucan.js b/backend/routes/routesToucan.js index f030712..4d2a4ae 100644 --- a/backend/routes/routesToucan.js +++ b/backend/routes/routesToucan.js @@ -172,14 +172,17 @@ router.get('/pdf/:urlId', (req, res) => { } }); -router.get('/pdf/urlID', (req, res) => { - try { - urltoucans.exec((err,data) => { - if (err) { - console.log(err); +router.get('/pdf/url', (req, res) => { + try { + console.log(req.params.url); + urltoucans. + match({urlId: 'boule-2022'}). + exec((err,data) => { + if (err) { + console.log(err); - } else { - res.send(data); + } else { + console.log(data); }}); } catch (err) { console.log(err); -- GitLab