Skip to content

Commit

Permalink
Merge pull request #143 from ReflectionsProjections/dev/jacob/weak-ve…
Browse files Browse the repository at this point in the history
…rify

Turn off weak verify for most endpoints
  • Loading branch information
AydanPirani authored Sep 18, 2024
2 parents 11c496c + 77c5ee5 commit ee98ad5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/services/auth/auth-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/services/events/events-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,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 {
Expand Down Expand Up @@ -148,7 +148,7 @@ eventsRouter.put(
// Delete event
eventsRouter.delete(
"/:EVENTID",
RoleChecker([Role.Enum.ADMIN], true),
RoleChecker([Role.Enum.ADMIN]),
async (req, res, next) => {
const eventId = req.params.EVENTID;
try {
Expand Down
4 changes: 2 additions & 2 deletions src/services/speakers/speakers-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/services/stats/stats-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,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([
Expand Down

0 comments on commit ee98ad5

Please sign in to comment.