Fix Exception in callback of async function: TypeError: this._now is not a function.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2023-04-21 21:15:00 +03:00
parent 5034c957ba
commit aeb0f1e6d8

View file

@ -95,6 +95,7 @@ Attachments = new FilesCollection({
fileObj.versions[versionName].storage = STORAGE_NAME_FILESYSTEM;
});
this._now = new Date();
Attachments.update({ _id: fileObj._id }, { $set: { "versions" : fileObj.versions } });
Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now() } });