mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 20:23:08 +02:00
Fix bug
This commit is contained in:
parent
a85d5ac4bb
commit
71b1de8367
1 changed files with 2 additions and 2 deletions
|
@ -17,12 +17,12 @@ const migrate = async (doc) => {
|
||||||
async function main() {
|
async function main() {
|
||||||
let i = 0;
|
let i = 0;
|
||||||
|
|
||||||
const count = await db.get('drive_files').count({});
|
const count = await DriveFile.count({});
|
||||||
|
|
||||||
const iterate = async () => {
|
const iterate = async () => {
|
||||||
if (i == count) return true;
|
if (i == count) return true;
|
||||||
console.log(`${i} / ${count}`);
|
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);
|
const res = await migrate(doc);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue