From 052bca0618a9a15fe0e8616b7766aa2b9c4d0745 Mon Sep 17 00:00:00 2001 From: Jacob Chang Date: Sun, 8 Sep 2024 20:40:18 -0500 Subject: [PATCH] turn off most of weak verify --- src/services/auth/auth-router.ts | 6 +++--- src/services/events/events-router.ts | 4 ++-- src/services/speakers/speakers-router.ts | 4 ++-- src/services/stats/stats-router.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/services/auth/auth-router.ts b/src/services/auth/auth-router.ts index 2a1c4d9..41f43f7 100644 --- a/src/services/auth/auth-router.ts +++ b/src/services/auth/auth-router.ts @@ -154,7 +154,7 @@ authRouter.get("/dev/", (req, res) => { authRouter.get( "/corporate", - RoleChecker([Role.Enum.ADMIN], true), + RoleChecker([Role.Enum.ADMIN]), async (req, res, next) => { try { const allCorporate = await Database.CORPORATE.find(); @@ -168,7 +168,7 @@ authRouter.get( authRouter.post( "/corporate", - RoleChecker([Role.Enum.ADMIN], true), + RoleChecker([Role.Enum.ADMIN]), async (req, res, next) => { try { const attendeeData = CorporateValidator.parse(req.body); @@ -184,7 +184,7 @@ authRouter.post( authRouter.delete( "/corporate", - RoleChecker([Role.Enum.ADMIN], true), + RoleChecker([Role.Enum.ADMIN]), async (req, res, next) => { try { const attendeeData = CorporateDeleteRequest.parse(req.body); diff --git a/src/services/events/events-router.ts b/src/services/events/events-router.ts index 2870995..0e5fac1 100644 --- a/src/services/events/events-router.ts +++ b/src/services/events/events-router.ts @@ -117,7 +117,7 @@ eventsRouter.post( eventsRouter.put( "/:EVENTID", - RoleChecker([Role.Enum.STAFF], true), + RoleChecker([Role.Enum.STAFF]), async (req, res, next) => { const eventId = req.params.EVENTID; try { @@ -145,7 +145,7 @@ eventsRouter.put( // Delete event eventsRouter.delete( "/:EVENTID", - RoleChecker([Role.Enum.STAFF], true), + RoleChecker([Role.Enum.STAFF]), async (req, res, next) => { const eventId = req.params.EVENTID; try { diff --git a/src/services/speakers/speakers-router.ts b/src/services/speakers/speakers-router.ts index 1eddac0..3cd8e09 100644 --- a/src/services/speakers/speakers-router.ts +++ b/src/services/speakers/speakers-router.ts @@ -59,7 +59,7 @@ speakersRouter.post( // Update a speaker speakersRouter.put( "/:SPEAKERID", - RoleChecker([Role.Enum.STAFF], true), + RoleChecker([Role.Enum.STAFF]), async (req, res, next) => { const speakerId = req.params.SPEAKERID; @@ -87,7 +87,7 @@ speakersRouter.put( // Delete a speaker speakersRouter.delete( "/:SPEAKERID", - RoleChecker([Role.Enum.STAFF], true), + RoleChecker([Role.Enum.STAFF]), async (req, res, next) => { const speakerId = req.params.SPEAKERID; diff --git a/src/services/stats/stats-router.ts b/src/services/stats/stats-router.ts index 2ecb040..abe78df 100644 --- a/src/services/stats/stats-router.ts +++ b/src/services/stats/stats-router.ts @@ -98,7 +98,7 @@ statsRouter.get( // Get the dietary restriction breakdown/counts (staff only) statsRouter.get( "/dietary-restrictions", - RoleChecker([Role.enum.STAFF], true), + RoleChecker([Role.enum.STAFF], false), async (req, res, next) => { try { const results = await Promise.allSettled([