From 344e13ebcbc65b3b064def0108c343f876f96ebc Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 6 Mar 2021 22:34:26 +0900 Subject: [PATCH] fix bug --- src/server/api/endpoints/admin/show-users.ts | 2 +- src/server/api/endpoints/users.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/admin/show-users.ts b/src/server/api/endpoints/admin/show-users.ts index 03abe7a57b..17fbefdf61 100644 --- a/src/server/api/endpoints/admin/show-users.ts +++ b/src/server/api/endpoints/admin/show-users.ts @@ -71,7 +71,7 @@ export default define(meta, async (ps, me) => { case 'available': query.where('user.isSuspended = FALSE'); break; case 'admin': query.where('user.isAdmin = TRUE'); break; case 'moderator': query.where('user.isModerator = TRUE'); break; - case 'adminOrModerator': query.where('user.isAdmin = TRUE OR isModerator = TRUE'); break; + case 'adminOrModerator': query.where('user.isAdmin = TRUE OR user.isModerator = TRUE'); break; case 'alive': query.where('user.updatedAt > :date', { date: new Date(Date.now() - 1000 * 60 * 60 * 24 * 5) }); break; case 'silenced': query.where('user.isSilenced = TRUE'); break; case 'suspended': query.where('user.isSuspended = TRUE'); break; diff --git a/src/server/api/endpoints/users.ts b/src/server/api/endpoints/users.ts index 1c16472578..933eb70b6f 100644 --- a/src/server/api/endpoints/users.ts +++ b/src/server/api/endpoints/users.ts @@ -69,7 +69,7 @@ export default define(meta, async (ps, me) => { switch (ps.state) { case 'admin': query.andWhere('user.isAdmin = TRUE'); break; case 'moderator': query.andWhere('user.isModerator = TRUE'); break; - case 'adminOrModerator': query.andWhere('user.isAdmin = TRUE OR isModerator = TRUE'); break; + case 'adminOrModerator': query.andWhere('user.isAdmin = TRUE OR user.isModerator = TRUE'); break; case 'alive': query.andWhere('user.updatedAt > :date', { date: new Date(Date.now() - 1000 * 60 * 60 * 24 * 5) }); break; }