Patched some holes when poking with curl
This commit is contained in:
@@ -3,13 +3,13 @@ const { accounts } = require('../database/models');
|
||||
|
||||
//auth/update
|
||||
const route = async (req, res) => {
|
||||
//generate the password hash
|
||||
let hash;
|
||||
|
||||
if (req.body.password) {
|
||||
hash = await bcrypt.hash(req.body.password, await bcrypt.genSalt(11));
|
||||
if (!req.body.password) {
|
||||
return res.status(401).end('Missing password');
|
||||
}
|
||||
|
||||
//generate the password hash
|
||||
let hash = await bcrypt.hash(req.body.password, await bcrypt.genSalt(11));
|
||||
|
||||
//update the account
|
||||
await accounts.update({
|
||||
contact: req.body.contact,
|
||||
|
||||
Reference in New Issue
Block a user