core&ui: add contest private files (#1053)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2025-10-17 10:24:38 +01:00
1 parent 9729346ad9
commit f5ef8b7f38
35 files changed
+781 -843

No files matched your search

+2 -2
View File
@@ -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 } } : {}) },
);
}