diff options
author | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2023-05-04 08:38:32 -0400 |
---|---|---|
committer | Ibrahim Mkusa <ibrahimmkusa@gmail.com> | 2023-05-04 08:38:32 -0400 |
commit | 6b3877aac724d9692a099e23ca5ed1e1b17037be (patch) | |
tree | d1dd877ba868e260956403ab84476bfb7891ca25 /practice | |
parent | ff4834445ba2a8d65c08ebbf6b422117494efd1a (diff) |
REST DELETE and fun with Postmanfun-with-node
Diffstat (limited to 'practice')
-rw-r--r-- | practice/index.js | 2 |
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() }) |