Skip to content

Commit 161d25f

Browse files
committed
fix(backend): resolve eslint imports and curly brace styling in connect.ts
1 parent abef268 commit 161d25f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

apps/backend/src/routes/connect.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import type { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
2-
import { randomBytes } from 'crypto';
1+
import { randomBytes } from 'node:crypto';
2+
33
import { encrypt } from '../utils/encryption.js';
44

5+
import type { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
6+
57
const GITHUB_AUTH_URL = 'https://github.com/login/oauth/authorize';
68
const GITHUB_TOKEN_URL = 'https://github.com/login/oauth/access_token';
79

@@ -102,7 +104,9 @@ export async function connectRoutes(app: FastifyInstance): Promise<void> {
102104
}
103105

104106
// Consume the nonce -- one-time use only (if redis configured)
105-
if (app.redis) await app.redis.del(`oauth:nonce:${decodedState.nonce}`);
107+
if (app.redis) {
108+
await app.redis.del(`oauth:nonce:${decodedState.nonce}`);
109+
}
106110

107111
const userId = decodedState.userId;
108112

0 commit comments

Comments
 (0)