mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-08 17:07:44 +08:00
fixed invalid db for audits
This commit is contained in:
parent
7059f00e46
commit
2681ceb764
1 changed files with 7 additions and 5 deletions
|
@ -30,10 +30,12 @@ let run = async (taskData, options) => {
|
|||
}
|
||||
|
||||
let mailboxes = new Map(
|
||||
(await db.database
|
||||
.collection('mailboxes')
|
||||
.find({ user: taskData.user })
|
||||
.toArray()).map(mailboxData => [mailboxData._id.toString(), mailboxData])
|
||||
(
|
||||
await db.database
|
||||
.collection('mailboxes')
|
||||
.find({ user: taskData.user })
|
||||
.toArray()
|
||||
).map(mailboxData => [mailboxData._id.toString(), mailboxData])
|
||||
);
|
||||
|
||||
let processMessage = async messageData => {
|
||||
|
@ -61,7 +63,7 @@ let run = async (taskData, options) => {
|
|||
let status = 'imported'; //expect to complete successfully
|
||||
|
||||
let processMessages = async collection => {
|
||||
let cursor = await db.users.collection(collection).find(query, {
|
||||
let cursor = await db.database.collection(collection).find(query, {
|
||||
projection: {
|
||||
_id: true,
|
||||
user: true,
|
||||
|
|
Loading…
Reference in a new issue