From ab68d1f75e852b20554ae44a94aed3b261390389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AC=B4=EB=9D=BC=EC=BF=A0=EB=AA=A8?= Date: Tue, 13 Aug 2024 16:18:16 +0900 Subject: [PATCH] fix(ApiCallService): logical OR --- packages/backend/src/server/api/ApiCallService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/ApiCallService.ts b/packages/backend/src/server/api/ApiCallService.ts index 39596d041..d7c7836ed 100644 --- a/packages/backend/src/server/api/ApiCallService.ts +++ b/packages/backend/src/server/api/ApiCallService.ts @@ -310,7 +310,7 @@ export class ApiCallService implements OnApplicationShutdown { } } - if ((ep.meta.requireModerator ?? ep.meta.requireAdmin)) { + if (ep.meta.requireModerator || ep.meta.requireAdmin) { const myRoles = await this.roleService.getUserRoles(user!.id); const isModerator = myRoles.some(r => r.isModerator || r.isAdministrator); const isAdmin = myRoles.some(r => r.isAdministrator);