Update api.js

This commit is contained in:
xfarrow 2023-10-02 12:21:13 +02:00
parent 54a2d5397c
commit 4a0f7c093c

View File

@ -43,6 +43,8 @@ app.post('/api/register', (req, res) => {
return res.status(400).json("Invalid request");
}
// The callback denoted by the arrow function is executed asynchronously
// from the rest of the code outside of the hash() function
bcrypt.hash(userData.password, 10, (err, hashedPassword) => {
if (err) {