kgpmask / MASK

The website for the Manga and Anime Society Kharagpur.
https://kgpmask.club
Mozilla Public License 2.0
9 stars 4 forks source link

Query parameters instead of req.params #196

Closed Goose-Of-War closed 1 year ago

Goose-Of-War commented 1 year ago

Many of our GET requests use something like this.

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)

Should we do this for all GET requests?