Skip to content

Commit f8ed709

Browse files
chore(deps): bump fastify from 5.7.4 to 5.8.1 in the npm_and_yarn group across 1 directory (#134)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
1 parent 57c7a99 commit f8ed709

4 files changed

Lines changed: 150 additions & 124 deletions

File tree

apps/node-fastify/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"dependencies": {
2121
"@fastify/autoload": "^6.3.1",
2222
"@fastify/type-provider-typebox": "^6.1.0",
23-
"@sentry/node": "^10.39.0",
23+
"@sentry/node": "^10.42.0",
2424
"dotenv": "^17.3.1",
25-
"fastify": "^5.7.4",
25+
"fastify": "^5.8.2",
2626
"orb-sync-lib": "*",
2727
"fastify-metrics": "^12.1.0"
2828
},

apps/node-fastify/src/utils/verifyApiKey.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ import { FastifyReply, FastifyRequest, HookHandlerDoneFunction } from 'fastify';
22
import { getConfig } from './config';
33
import { timingSafeEqual } from 'node:crypto';
44

5-
export const verifyApiKey = (request: FastifyRequest, reply: FastifyReply, done: HookHandlerDoneFunction): unknown => {
5+
export const verifyApiKey = (request: FastifyRequest, reply: FastifyReply, done: HookHandlerDoneFunction): void => {
66
const config = getConfig();
77

88
if (!request.headers || !request.headers.authorization) {
9-
return reply.code(401).send('Unauthorized');
9+
reply.code(401).send('Unauthorized');
10+
return
1011
}
1112
const { authorization } = request.headers;
1213

1314
if (!apiKeyMatches(authorization, config.API_KEY_SYNC) && !apiKeyMatches(authorization, config.API_KEY_SYNC_ALT)) {
14-
return reply.code(401).send('Unauthorized');
15+
reply.code(401).send('Unauthorized');
16+
return
1517
}
1618

1719
done();

0 commit comments

Comments
 (0)