mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-27 17:38:11 +03:00
25 lines
538 B
TypeScript
25 lines
538 B
TypeScript
import db from "../../src/db/db";
|
|
|
|
(async () => {
|
|
db.folders
|
|
.find({})
|
|
// @ts-expect-error ??? monk
|
|
.each(async (c, { pause, resume }) => {
|
|
pause();
|
|
|
|
await db.folders.update(
|
|
{
|
|
_id: c._id,
|
|
},
|
|
{
|
|
$set: {
|
|
tableIndex: Number(c.tableIndex),
|
|
},
|
|
}
|
|
);
|
|
|
|
resume();
|
|
})
|
|
.then(() => console.log("done"));
|
|
})();
|