Skip to content

Commit d511e64

Browse files
committed
change deprecated bcrypt-nodejs to bcrypt
1 parent 0400847 commit d511e64

File tree

3 files changed

+1414
-1395
lines changed

3 files changed

+1414
-1395
lines changed

app/models/user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const mongoose = require('mongoose')
2-
const bcrypt = require('bcrypt-nodejs')
2+
const bcrypt = require('bcrypt')
33
const validator = require('validator')
44
const mongoosePaginate = require('mongoose-paginate-v2')
55

@@ -83,7 +83,7 @@ const UserSchema = new mongoose.Schema(
8383
)
8484

8585
const hash = (user, salt, next) => {
86-
bcrypt.hash(user.password, salt, null, (error, newHash) => {
86+
bcrypt.hash(user.password, salt, (error, newHash) => {
8787
if (error) {
8888
return next(error)
8989
}

0 commit comments

Comments
 (0)