From 9d956775b0f98b532185b1d8fa762cd7fcc29ec8 Mon Sep 17 00:00:00 2001 From: angelperea Date: Thu, 7 Jan 2021 13:48:09 +0100 Subject: [PATCH] fixed problem with login --- src/controllers/userController.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/userController.ts b/src/controllers/userController.ts index f0d2035..5c44f28 100644 --- a/src/controllers/userController.ts +++ b/src/controllers/userController.ts @@ -10,11 +10,10 @@ import { JWT_SECRET } from "../util/secrets"; export class UserController { public async registerUser(req: Request, res: Response): Promise { - const hashedPassword = bcrypt.hashSync(req.body.password, bcrypt.genSaltSync(10)); await User.create({ username: req.body.username, - password: hashedPassword, + password: req.body.password, }); @@ -40,4 +39,4 @@ export class UserController { -} \ No newline at end of file +}