aboutsummaryrefslogtreecommitdiff
path: root/practice
diff options
context:
space:
mode:
authorIbrahim Mkusa <ibrahimmkusa@gmail.com>2023-05-04 08:38:32 -0400
committerIbrahim Mkusa <ibrahimmkusa@gmail.com>2023-05-04 08:38:32 -0400
commit6b3877aac724d9692a099e23ca5ed1e1b17037be (patch)
treed1dd877ba868e260956403ab84476bfb7891ca25 /practice
parentff4834445ba2a8d65c08ebbf6b422117494efd1a (diff)
REST DELETE and fun with Postmanfun-with-node
Diffstat (limited to 'practice')
-rw-r--r--practice/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/practice/index.js b/practice/index.js
index 2abb422..f6f51a5 100644
--- a/practice/index.js
+++ b/practice/index.js
@@ -43,7 +43,7 @@ app.get('/api/notes/:id', (request, response) => {
app.delete('/api/notes/:id', (request, response) => {
const id = Number(request.params.id)
- const note = notes.filter(note => note.id !== id)
+ notes = notes.filter(note => note.id !== id)
response.status(204).end()
})