I have an endpoint: POST /:service
/confirm. This is handled by
index.js
router.use("/:services", services);
services.js
router.post("/confirm", (req, res) => {
console.log(req.params);
});
I'm planning to get the params.services
inside of services.js
. But when I logged it, its empty. I'm assuming that req.params
is focusing on the current path. Are there any workarounds for this?