aboutsummaryrefslogtreecommitdiffstats
path: root/pages/api/notes.js
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/notes.js')
-rw-r--r--pages/api/notes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/pages/api/notes.js b/pages/api/notes.js
index 73a7217..dd31c6f 100644
--- a/pages/api/notes.js
+++ b/pages/api/notes.js
@@ -78,7 +78,7 @@ export default withSession(async (req, res) => {
throw new Error('Something went wrong')
}
- await Note.findByIdAndUpdate(noteId, {content}, {new: true})
+ await Note.updateNote(noteId, content)
const notes = await NoteList.findOneAndUpdate(
{ _id: user.noteList, "notes.noteId": noteId },