Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backend/gql/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
context: { req: { headers: { authorization?: string } } },
info: GraphQLResolveInfo
) {

Check failure on line 25 in backend/gql/middleware.ts

View workflow job for this annotation

GitHub Actions / run-lint

Delete `⏎⏎`

// Skip authentication in development mode for easier testing/refactoring
if (process.env.NODE_ENV !== 'production') {

Check failure on line 28 in backend/gql/middleware.ts

View workflow job for this annotation

GitHub Actions / run-lint

Replace `'production'` with `"production"`
return resolve(parent, args, context, info);
} //remove before prod

Check failure on line 30 in backend/gql/middleware.ts

View workflow job for this annotation

GitHub Actions / run-lint

Delete `·`

Check failure on line 30 in backend/gql/middleware.ts

View workflow job for this annotation

GitHub Actions / run-lint

Expected exception block, space or tab after '//' in comment

const authHeader = context.req.headers.authorization;
if (!authHeader || !authHeader.startsWith("Bearer")) {
throw new Error("missing or invalid authorization header");
Expand Down
3 changes: 1 addition & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lint": "eslint . --ext .ts,.js",
"fix": "eslint . --ext .ts,.js --fix",
"postinstall": "npx prisma generate && tsc",
"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"
"start": "npx prisma migrate deploy && npx prisma generate && if [ \"$NODE_ENV\" = \"production\" ]; then node build/server.js; else nodemon -L; fi"
},
"keywords": [],
"author": "",
Expand Down Expand Up @@ -91,7 +91,6 @@
"config": "prisma/seed/seed.config.ts"
},
"prisma": {
"seed": "npx tsx ./prisma/seed/seed.ts",
"schema": "./prisma/schema.prisma"
},
"engines": {
Expand Down
Loading
Loading