Skip to content

Commit 6fdd95b

Browse files
committed
done
1 parent 5502ae9 commit 6fdd95b

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

backend/src/middleware/passport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export function initPassport() {
2121
callbackURL: GOOGLE_CALLBACK_URL!,
2222
},
2323
async (
24-
accessToken: string,
25-
refreshToken: string,
24+
_accessToken: string,
25+
_refreshToken: string,
2626
profile: Profile,
2727
done
2828
) => {

backend/src/routes/auth.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { logger } from "../services/logger";
88
import { AuthProvider } from "../lib/types";
99
import "../types/user";
1010

11-
const router = Router();
11+
const router: Router = Router();
1212

1313
interface UserDetails {
1414
id: string;
@@ -45,12 +45,14 @@ router.get("/me", (req: Request, res: Response) => {
4545
provider: user.provider,
4646
},
4747
});
48+
return;
4849
} catch (err) {
4950
logger.error("Error in /auth/me:", err);
5051
res.status(401).json({
5152
success: false,
5253
message: "Unauthenticated",
5354
});
55+
return;
5456
}
5557
});
5658

@@ -139,12 +141,14 @@ router.get("/refresh", async (req: Request, res: Response) => {
139141
isGuest,
140142
},
141143
});
144+
return;
142145
} catch (error) {
143146
logger.error("Error refreshing token:", error);
144147
res.status(500).json({
145148
success: false,
146149
message: "Failed to refresh token",
147150
});
151+
return;
148152
}
149153
});
150154

backend/src/routes/room.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Request, Response, Router } from "express";
22
import { prisma } from "../lib/prisma";
33
import { RoomStatus } from "../lib/types";
44

5-
const router = Router();
5+
const router: Router = Router();
66

77
router.get(`/lookup`, async (req: Request, res: Response) => {
88
try {
@@ -42,11 +42,13 @@ router.get(`/lookup`, async (req: Request, res: Response) => {
4242
message: "Room found successfully",
4343
data: room,
4444
});
45+
return;
4546
} catch {
4647
res.status(401).json({
4748
success: false,
4849
message: "Unauthorized",
4950
});
51+
return;
5052
}
5153
});
5254

backend/src/services/redis.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class RedisService {
66
private static _instance: RedisService;
77
private client: RedisClientType;
88
private isConnected = false;
9+
// @ts-ignore
910
private reconnectAttempts = 0;
1011
private maxReconnectAttempts = 5;
1112

backend/src/stockfish.d.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

backend/tsconfig.json

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
{
22
"compilerOptions": {
3-
"target": "es2020",
4-
"module": "esnext",
5-
"rootDir": "./src",
6-
"moduleResolution": "bundler",
7-
3+
"target": "ES2020",
4+
"module": "commonjs",
5+
"lib": ["ES2020"],
86
"outDir": "./dist",
9-
7+
"rootDir": "./src",
108
"baseUrl": ".",
11-
"paths": {
12-
"@/*": ["src/*"]
13-
},
9+
"paths": {},
10+
"strict": true,
1411
"esModuleInterop": true,
12+
"skipLibCheck": true,
1513
"forceConsistentCasingInFileNames": true,
16-
17-
"strict": true,
18-
19-
"skipLibCheck": true
14+
"resolveJsonModule": true,
15+
"declaration": true,
16+
"declarationMap": true,
17+
"noImplicitAny": true,
18+
"noImplicitReturns": true,
19+
"noImplicitThis": true,
20+
"noUnusedLocals": true,
21+
"noUnusedParameters": true,
22+
"exactOptionalPropertyTypes": false,
23+
"experimentalDecorators": true,
24+
"emitDecoratorMetadata": true
2025
},
21-
"include": ["src/**/*", "backend/src/**/*"],
22-
"exclude": ["dist"]
26+
"include": ["src/**/*"],
27+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
2328
}

0 commit comments

Comments
 (0)