Skip to content

Commit 5dd1e0a

Browse files
Update part3c.md replaced findByIdAndRemove (deprecated) with findByIdAndDelete and also updated docs link for the function
1 parent 493628f commit 5dd1e0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/3/en/part3c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,11 +852,11 @@ Now the handling of unknown endpoints is ordered <i>before the HTTP request hand
852852

853853
Let's add some missing functionality to our application, including deleting and updating an individual note.
854854

855-
The easiest way to delete a note from the database is with the [findByIdAndRemove](https://mongoosejs.com/docs/api/model.html#model_Model-findByIdAndRemove) method:
855+
The easiest way to delete a note from the database is with the [findByIdAndDelete](https://mongoosejs.com/docs/api/model.html#Model.findByIdAndDelete()) method:
856856

857857
```js
858858
app.delete('/api/notes/:id', (request, response, next) => {
859-
Note.findByIdAndRemove(request.params.id)
859+
Note.findByIdAndDelete(request.params.id)
860860
.then(result => {
861861
response.status(204).end()
862862
})

0 commit comments

Comments
 (0)