Skip to content

Commit 8655c0d

Browse files
authored
Merge pull request #342 from uwblueprint/judy/reports_page_refactor
Reports Page Refactor
2 parents 3f7bb36 + f81e6c0 commit 8655c0d

25 files changed

+1349
-25689
lines changed

backend/gql/middleware.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ function verifyRole(allowedRoles: string[]) {
2222
context: { req: { headers: { authorization?: string } } },
2323
info: GraphQLResolveInfo
2424
) {
25+
26+
27+
// Skip authentication in development mode for easier testing/refactoring
28+
if (process.env.NODE_ENV !== 'production') {
29+
return resolve(parent, args, context, info);
30+
} //remove before prod
31+
2532
const authHeader = context.req.headers.authorization;
2633
if (!authHeader || !authHeader.startsWith("Bearer")) {
2734
throw new Error("missing or invalid authorization header");

backend/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"lint": "eslint . --ext .ts,.js",
88
"fix": "eslint . --ext .ts,.js --fix",
99
"postinstall": "npx prisma generate && tsc",
10-
"start": "npx prisma migrate deploy && npx prisma generate && npx @snaplet/seed sync && npx prisma db seed && if [ \"$NODE_ENV\" = \"production\" ]; then node build/server.js; else nodemon -L; fi"
10+
"start": "npx prisma migrate deploy && npx prisma generate && if [ \"$NODE_ENV\" = \"production\" ]; then node build/server.js; else nodemon -L; fi"
1111
},
1212
"keywords": [],
1313
"author": "",
@@ -91,7 +91,6 @@
9191
"config": "prisma/seed/seed.config.ts"
9292
},
9393
"prisma": {
94-
"seed": "npx tsx ./prisma/seed/seed.ts",
9594
"schema": "./prisma/schema.prisma"
9695
},
9796
"engines": {

0 commit comments

Comments
 (0)