arreglado error de joi🤮

This commit is contained in:
2025-08-14 01:15:56 -03:00
parent 5bb456179f
commit 8d23c74bce
4 changed files with 448 additions and 10 deletions

View File

@@ -19,7 +19,6 @@ const register: RequestHandler = async (req, res, next) => {
}
const { username, password } = req.body
// Verify account username as unique
const found = await Account.findOne({ username })
@@ -31,7 +30,7 @@ const register: RequestHandler = async (req, res, next) => {
}
// Encrypt password
const hash = crypt.hash(password)
const hash = await crypt.hash(password)
// Create account
const account = new Account({ username, password: hash })