修复云端数据一致性问题

This commit is contained in:
2026-07-29 11:03:44 +08:00
parent a3dd080b6f
commit 17727ab1dd
12 changed files with 389 additions and 41 deletions
+11
View File
@@ -0,0 +1,11 @@
const deleteAllPages = async (fetchPage, remove) => {
while (true) {
const page = await fetchPage()
if (!Array.isArray(page) || page.length === 0) return
for (const doc of page) {
await remove(doc._id)
}
}
}
module.exports = { deleteAllPages }