This commit is contained in:
2025-10-30 10:13:17 -06:00
5 changed files with 32 additions and 9 deletions
Binary file not shown.
Binary file not shown.
+22 -8
View File
@@ -17,7 +17,7 @@
"@nestjs/platform-express": "^11.0.1",
"@nestjs/typeorm": "^11.0.0",
"axios": "^1.13.1",
"bcryptjs": "^3.0.2",
"bcrypt": "^6.0.0",
"class-transformer": "0.5.1",
"class-validator": "0.14.2",
"mysql2": "^3.15.2",
@@ -35,6 +35,7 @@
"@nestjs/config": "^4.0.2",
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.1",
"@types/bcrypt": "^6.0.0",
"@types/express": "^5.0.0",
"@types/jest": "^30.0.0",
"@types/node": "^22.10.7",
@@ -2851,6 +2852,15 @@
"@babel/types": "^7.28.2"
}
},
"node_modules/@types/bcrypt": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-6.0.0.tgz",
"integrity": "sha512-/oJGukuH3D2+D+3H4JWLaAsJ/ji86dhRidzZ/Od7H/i8g+aCmvkeCc6Ni/f9uxGLSQVCRZkX2/lqEFG2BvWtlQ==",
"dev": true,
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/body-parser": {
"version": "1.19.6",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz",
@@ -4306,13 +4316,17 @@
"baseline-browser-mapping": "dist/cli.js"
}
},
"node_modules/bcryptjs": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.2.tgz",
"integrity": "sha512-k38b3XOZKv60C4E2hVsXTolJWfkGRMbILBIe2IBITXciy5bOsTKot5kDrf3ZfufQtQOUN5mXceUEpU1rTl9Uog==",
"license": "BSD-3-Clause",
"bin": {
"bcrypt": "bin/bcrypt"
"node_modules/bcrypt": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-6.0.0.tgz",
"integrity": "sha512-cU8v/EGSrnH+HnxV2z0J7/blxH8gq7Xh2JFT6Aroax7UohdmiJJlxApMxtKfuI7z68NvvVcmR78k2LbT6efhRg==",
"hasInstallScript": true,
"dependencies": {
"node-addon-api": "^8.3.0",
"node-gyp-build": "^4.8.4"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/bl": {
+2 -1
View File
@@ -8,7 +8,7 @@
"scripts": {
"build": "nest build",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"start": "nest start",
"start": "source ~/.nvm/nvm.sh && nvm use 22.10.0 && npm install && nest start",
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
@@ -46,6 +46,7 @@
"@nestjs/config": "^4.0.2",
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.1",
"@types/bcrypt": "^6.0.0",
"@types/express": "^5.0.0",
"@types/jest": "^30.0.0",
"@types/node": "^22.10.7",
+8
View File
@@ -24,8 +24,12 @@ export class AuthService {
}
try {
<<<<<<< HEAD
const salt = await bcrypt.genSalt(10);
const hashedContraseña = await bcrypt.hash(contraseña, salt);
=======
const hashedContraseña = await bcrypt.hash(contraseña,10);
>>>>>>> 3317b7bdbe91d04618f00c28caeca76c35803f9c
await this.usuarioService.create({
nombre,
@@ -48,6 +52,10 @@ export class AuthService {
}
const contraseñaValida = await bcrypt.compare(
<<<<<<< HEAD
=======
usuario.contraseña,
>>>>>>> 3317b7bdbe91d04618f00c28caeca76c35803f9c
contraseña,
usuario.contraseña,
);