core: fix storage copy

This commit is contained in:
undefined committed 2025-03-12 16:21:53 +08:00
1 parent af1b12deed
commit af118e6ed9
1 file changed
+1 -1
+1 -1
View File
@@ -151,7 +151,7 @@ export class StorageModel {
// eslint-disable-next-line no-await-in-loop
while (await StorageModel.coll.findOne({ _id })) _id = StorageModel.generateId(extname(dst));
await StorageModel.coll.insertOne({
...value, _id, path: dst, link: value._id, lastModified: new Date(), owner: value.owner || 1,
...value, _id, path: dst, link: value.link || value._id, lastModified: new Date(), owner: value.owner || 1,
});
return _id;
}