fix(mailbox-create): Use correct database for loading User data when creating mailboxes (#550)

This commit is contained in:
Andris Reinman 2023-11-06 12:30:23 +02:00 committed by GitHub
parent 48b9efb8ca
commit 4434cb5e1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ class MailboxHandler {
}
async createAsync(user, path, opts) {
const userData = await this.database.collection('users').findOne({ _id: user }, { projection: { retention: true } });
const userData = await this.users.collection('users').findOne({ _id: user }, { projection: { retention: true } });
if (!userData) {
const err = new Error('This user does not exist');