fixes
This commit is contained in:
@@ -71,6 +71,8 @@ async function refreshQuotaForDomain(req: any, domain: string): Promise<number>
|
||||
mailboxesRouter.get('/', async (req, res) => {
|
||||
const domain = String(req.query.domain ?? '').toLowerCase();
|
||||
const refreshQuota = String(req.query.refreshQuota ?? '').toLowerCase() === 'true';
|
||||
// Hide soft-deleted mailboxes by default. Set ?includeDeleted=true if you ever want them.
|
||||
const includeDeleted = String(req.query.includeDeleted ?? '').toLowerCase() === 'true';
|
||||
|
||||
if (domain) {
|
||||
ensureDomain(req, domain);
|
||||
@@ -82,6 +84,7 @@ mailboxesRouter.get('/', async (req, res) => {
|
||||
|
||||
const params: unknown[] = [config.nodeName];
|
||||
let where = 'WHERE node_name=$1';
|
||||
if (!includeDeleted) where += ` AND status <> 'deleted'`;
|
||||
if (domain) { params.push(domain); where += ` AND domain=$${params.length}`; }
|
||||
|
||||
const result = await pool.query(
|
||||
|
||||
Reference in New Issue
Block a user