mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +01:00
Fix bug
This commit is contained in:
parent
934debd68e
commit
f2fc134839
@ -17,12 +17,12 @@ const migrate = async (doc) => {
|
||||
async function main() {
|
||||
let i = 0;
|
||||
|
||||
const count = await db.get('drive_files').count({});
|
||||
const count = await DriveFile.count({});
|
||||
|
||||
const iterate = async () => {
|
||||
if (i == count) return true;
|
||||
console.log(`${i} / ${count}`);
|
||||
const doc = (await db.get('drive_files').find({}, { limit: 1, skip: i }))[0]
|
||||
const doc = (await DriveFile.find({}, { limit: 1, skip: i }))[0]
|
||||
const res = await migrate(doc);
|
||||
if (!res) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user