fix model del & rename

This commit is contained in:
2026-07-31 11:15:54 +08:00
parent d45acaf50f
commit feaddfee7b
8 changed files with 196 additions and 28 deletions
+3 -2
View File
@@ -611,8 +611,9 @@ function createApp({
}
if (!records.length) return { success: false, errMsg: "数据库中未找到对应记录" };
let deletedCount = 0;
for (const record of records) deletedCount += await removeFile(database, record.fileID);
return { success: true, deletedFileID: records.map((record) => record.fileID).join(", "), deletedCount };
const fileIDs = [...new Set(records.map((record) => record.fileID))];
for (const fileID of fileIDs) deletedCount += await removeFile(database, fileID);
return { success: true, deletedFileID: fileIDs.join(", "), deletedCount };
});
}
case "publishIdentificationConfig": {