Compare commits

...

2 Commits

Author SHA1 Message Date
Kayne Ruse 4581f0376a Fixed crash when no password provided on account deletion 2021-03-10 23:43:57 +11:00
Kayne Ruse da8bba93eb Finally playing nice together 2021-03-07 15:34:04 +11:00
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
FROM node:15 FROM node:15
WORKDIR "/app" WORKDIR "/app"
COPY package*.json ./ COPY package*.json ./
+1 -1
View File
@@ -17,7 +17,7 @@ const route = async (req, res) => {
//compare the user's password //compare the user's password
const compare = utils.promisify(bcrypt.compare); 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) { if (!match) {
return res.status(401).send('incorrect password'); return res.status(401).send('incorrect password');