mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 02:33:09 +02:00
Fix bug
This commit is contained in:
parent
4da2439d20
commit
dc53f52c65
1 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ const migrate = async (doc) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const count = await db.get('users').count();
|
const count = await User.count();
|
||||||
|
|
||||||
console.log(`there are ${count} users.`)
|
console.log(`there are ${count} users.`)
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ async function main() {
|
||||||
1,
|
1,
|
||||||
async (time) => {
|
async (time) => {
|
||||||
console.log(`${time} / ${idop}`)
|
console.log(`${time} / ${idop}`)
|
||||||
const docs = await db.get('users').find({}, { limit: dop, skip: time * dop })
|
const docs = await User.find({}, { limit: dop, skip: time * dop })
|
||||||
return Promise.all(docs.map(migrate))
|
return Promise.all(docs.map(migrate))
|
||||||
},
|
},
|
||||||
idop
|
idop
|
||||||
|
|
Loading…
Reference in a new issue