skip to Main Content

Mongodb – Form DELETE method is redirecting to the GET method instead in EXPRESS JS

I have a form here with the delete method being used: <form action="/article/<%= articles[i]._id %>" method="DELETE"><button class="btn btn-danger" type="submit">Delete</button></form> Then my routes for the article ID's look like this: const articleById = require('../controllers/article/articleById') router.get('/:id', articleById) const deleteArticleById = require('../controllers/article/deleteArticleById') router.delete('/:id',…

VIEW QUESTION
Back To Top
Search