mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Fix #2901
This commit is contained in:
parent
7bdfb9aefa
commit
daa656fe60
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 => {
|
||||
notes.forEach(note => {
|
||||
note._files[note._files.findIndex(f => f._id.equals(file._id))] = file;
|
||||
Note.findOneAndUpdate({ _id: note._id }, {
|
||||
_files: note._files
|
||||
Note.update({ _id: note._id }, {
|
||||
$set: {
|
||||
_files: note._files
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue