Closed Hari-Shankar-Karthik closed 1 month ago
@Hari-Shankar-Karthik This repo is for the docs website only.
Please open this issue in https://github.com/expressjs/express ... Unfortunately, I can't move it, otherwise I would.
Thanks!
Thanks! I moved it.
Heyy devs of expressjs!
I'm making a simple website and ran into a bit of an issue. Essentially, my website has a list of campgrounds and each campground has a bunch of reviews. A user who is not logged in can still view each campground and the comments on them, but if they try to delete a particular review, they are redirected to the login page. After successful login, I want to redirect to
DELETE /campgrounds/:campgroundID/comments/:commentID
but unfortunately,res.redirect(...)
only alows for GET requests.This kind of a feature would be super helpful, thanks in advance!!!
P.S. It would be swell if this were possible for POST requests too but the trickier part about that is that the req.body also needs to redirect accordingly.