From 555a22b846b44d14f7982c5214af83369cc02f2e Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Mon, 12 Jan 2026 15:35:13 -0800 Subject: [PATCH] fix: Use hashPassword utility instead of dynamic bcrypt import --- backend/src/controllers/users.controller.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/controllers/users.controller.ts b/backend/src/controllers/users.controller.ts index cf17200..1fb1e05 100644 --- a/backend/src/controllers/users.controller.ts +++ b/backend/src/controllers/users.controller.ts @@ -1,4 +1,5 @@ import { FastifyRequest, FastifyReply } from 'fastify'; +import { hashPassword } from '../utils/password'; export const getUsers = async (request: FastifyRequest, reply: FastifyReply) => { // ... existing implementation ... @@ -83,9 +84,8 @@ export const createUser = async (request: FastifyRequest, reply: FastifyReply) = return reply.code(409).send({ message: 'User with this email already exists' }); } - // Hash password with bcrypt - const bcrypt = await import('bcrypt'); - const hashedPassword = await bcrypt.hash(data.password, 10); + // Hash password + const hashedPassword = await hashPassword(data.password); // Create user const user = await request.server.prisma.user.create({