diff options
author | 2022-05-06 17:19:48 +0100 | |
---|---|---|
committer | 2022-05-06 23:28:13 +0100 | |
commit | ef8d5215e8115ac47d058a667a93b27bc0887a7f (patch) | |
tree | eace42a7d5063d15814604401cd7b868a42f08b3 /apps/Notes/models/Note.js | |
parent | 618694df599da5a2027a6f7bcd9b0bf58ead309d (diff) | |
download | my_apps-ef8d5215e8115ac47d058a667a93b27bc0887a7f.tar.gz my_apps-ef8d5215e8115ac47d058a667a93b27bc0887a7f.tar.bz2 my_apps-ef8d5215e8115ac47d058a667a93b27bc0887a7f.zip |
small fixes
Diffstat (limited to 'apps/Notes/models/Note.js')
-rw-r--r-- | apps/Notes/models/Note.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/Notes/models/Note.js b/apps/Notes/models/Note.js index 0f4b3f9..c8cf854 100644 --- a/apps/Notes/models/Note.js +++ b/apps/Notes/models/Note.js @@ -11,7 +11,7 @@ noteSchema.statics.getNote = async (id) => { const content = decrypt(note.content) - return { ...note, content } + return { _id: note._id, content } } noteSchema.statics.updateNote = async (id, content) => { @@ -19,7 +19,7 @@ noteSchema.statics.updateNote = async (id, content) => { if (!note) throw new Error('Could not update note') - return { ...note, content } + return { _id: note._id, content } } noteSchema.pre('save', async function (next) { |