mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix storage copy
This commit is contained in:
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user