diff options
author | Mateja <mail@matejamaric.com> | 2021-05-03 17:44:38 +0200 |
---|---|---|
committer | Mateja <mail@matejamaric.com> | 2021-05-03 17:44:38 +0200 |
commit | 34b3fefaddd165b649c53e140f6b749c18943d26 (patch) | |
tree | 3c53c59d29df1fc1d3165eddd7c83ed3aab871f1 /routes/web.js | |
parent | 9eeca255cfe41ca4a962422c3703274caa530021 (diff) | |
download | node-playground-34b3fefaddd165b649c53e140f6b749c18943d26.tar.gz node-playground-34b3fefaddd165b649c53e140f6b749c18943d26.zip |
Add delete option on every post.
Diffstat (limited to 'routes/web.js')
-rw-r--r-- | routes/web.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routes/web.js b/routes/web.js index 732c87c..ee07d85 100644 --- a/routes/web.js +++ b/routes/web.js @@ -5,5 +5,6 @@ const postController = require('../controllers/post'); router.get('/', postController.index); router.get('/new-post', postController.create); router.post('/new-post', postController.store); +router.get('/remove-post/:id', postController.destroy); module.exports = router; |