Fix backend TypeScript build errors
- Inline tsconfig.base.json settings into backend/tsconfig.json so the Docker build (which only copies backend/) can resolve them - Replace default imports of Node built-ins (crypto, net) with named imports - Replace default bcrypt import with named imports (compare, hash) - Switch @fastify/websocket from v8 to v7 (SocketStream API) to match Fastify v4 peer dependency; update WebSocket handler signatures accordingly - Remove obsolete `version` key from docker-compose.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { FastifyInstance, FastifyRequest, FastifyReply } from 'fastify';
|
||||
import bcrypt from 'bcryptjs';
|
||||
import { compare as bcryptCompare } from 'bcryptjs';
|
||||
|
||||
interface LoginBody {
|
||||
username: string;
|
||||
@@ -30,7 +30,7 @@ export async function authRoutes(fastify: FastifyInstance) {
|
||||
return reply.status(401).send({ error: 'Invalid credentials' });
|
||||
}
|
||||
|
||||
const valid = await bcrypt.compare(password, user.passwordHash);
|
||||
const valid = await bcryptCompare(password, user.passwordHash);
|
||||
if (!valid) {
|
||||
return reply.status(401).send({ error: 'Invalid credentials' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user