mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add contest private files (#1053)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
9729346ad9
commit
f5ef8b7f38
35 files changed
+781
-843
No files matched your search
@@ -43,10 +43,10 @@ export class StorageModel {
|
||||
return await storage.get(value?.link || value?._id || path, savePath);
|
||||
}
|
||||
|
||||
static async rename(path: string, newPath: string, operator = 1) {
|
||||
static async rename(path: string, newPath: string, operator: null | number = 1) {
|
||||
return await StorageModel.coll.updateOne(
|
||||
{ path, autoDelete: null },
|
||||
{ $set: { path: newPath }, $push: { operator } },
|
||||
{ $set: { path: newPath }, ...(operator !== null ? { $push: { operator } } : {}) },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user