diff options
author | 2021-08-12 19:00:50 +0200 | |
---|---|---|
committer | 2021-08-12 19:00:50 +0200 | |
commit | 74abb7052d3af3c305cfe3c525aea311ccc446e1 (patch) | |
tree | 752f6da94ea8b554906774d878ecebfbfe8d724e /pages/api/notes.js | |
parent | 0660d3f5d3028ab3084c77f14a350d74c567bbd7 (diff) | |
download | my_apps-74abb7052d3af3c305cfe3c525aea311ccc446e1.tar.gz my_apps-74abb7052d3af3c305cfe3c525aea311ccc446e1.tar.bz2 my_apps-74abb7052d3af3c305cfe3c525aea311ccc446e1.zip |
crypt notes content
Diffstat (limited to 'pages/api/notes.js')
-rw-r--r-- | pages/api/notes.js | 2 |
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 }, |