diff --git a/server/auth/deletion.js b/server/auth/deletion.js index feadc3d..239936b 100644 --- a/server/auth/deletion.js +++ b/server/auth/deletion.js @@ -17,7 +17,7 @@ const route = async (req, res) => { //compare the user's password const compare = utils.promisify(bcrypt.compare); - const match = await compare(req.body.password, account.hash); + const match = await compare(req.body.password || '', account.hash); if (!match) { return res.status(401).send('incorrect password');