Skip to content

Commit

Permalink
fix: remove alias query to speed up admin dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Feb 22, 2024
1 parent b3748fe commit 08b4db0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/web/admin/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const locales = require('#config/locales');
// <https://stackoverflow.com/a/44096051>
const timezone = new Intl.DateTimeFormat().resolvedOptions().timeZone;

const models = { Users, Domains, Aliases };
const models = { Users, Domains };
const loadedLocales = {};

for (const locale of locales) {
Expand Down Expand Up @@ -436,9 +436,9 @@ async function getBody(ctx) {
[config.userFields.hasVerifiedEmail]: true,
[config.userFields.isBanned]: false
}
: name === 'Aliases'
? {}
: // TODO: replace queries like this with boolean `is_banned`
: // : name === 'Aliases'
// ? {}
// : // TODO: replace queries like this with boolean `is_banned`
// ? { user: { $nin: bannedUserIds } }
name === 'Domains'
? { 'members.user': { $nin: bannedUserIds } }
Expand Down

0 comments on commit 08b4db0

Please sign in to comment.