mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-30 04:13:03 +00:00
Fix #2901
This commit is contained in:
parent
e3faf64061
commit
3961fd08c9
1 changed files with 4 additions and 2 deletions
|
@ -100,8 +100,10 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
|
||||||
}).then(notes => {
|
}).then(notes => {
|
||||||
notes.forEach(note => {
|
notes.forEach(note => {
|
||||||
note._files[note._files.findIndex(f => f._id.equals(file._id))] = file;
|
note._files[note._files.findIndex(f => f._id.equals(file._id))] = file;
|
||||||
Note.findOneAndUpdate({ _id: note._id }, {
|
Note.update({ _id: note._id }, {
|
||||||
_files: note._files
|
$set: {
|
||||||
|
_files: note._files
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue