We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi, I found your boiler plate very helpful, thanks.
I have a question, why did you use asyn in the user.model.js file, but there's no "await" inside the function. just curious. for example - here:
userSchema.pre('save', async function save (next) { try { if (!this.isModified('password')) { return next() }
this.password = bcrypt.hashSync(this.password) return next()
} catch (error) { return next(error) } })
The text was updated successfully, but these errors were encountered:
They should use linter to deal with this.
Sorry, something went wrong.
Sorry, it was a mistake.
kasvith
No branches or pull requests
hi,
I found your boiler plate very helpful, thanks.
I have a question, why did you use asyn in the user.model.js file, but there's no "await" inside the function.
just curious.
for example - here:
userSchema.pre('save', async function save (next) {
try {
if (!this.isModified('password')) {
return next()
}
} catch (error) {
return next(error)
}
})
The text was updated successfully, but these errors were encountered: