Closed Goose-Of-War closed 1 year ago
Many of our GET requests use something like this.
GET
router.get('/some/path/:id?', (req, res) => {...})
Instead of using req.params.id, let's use req.query.id (the new route will be /some/path?id=something)
req.params.id
req.query.id
Should we do this for all GET requests?
Many of our
GET
requests use something like this.Instead of using
req.params.id
, let's usereq.query.id
(the new route will be /some/path?id=something)Should we do this for all GET requests?