Hopefully plugged an undefined username hole

This commit is contained in:
2021-04-28 21:00:48 +10:00
parent e141583f91
commit 768352b804
11 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ const route = async (req, res) => {
}, {
where: {
username: {
[Op.eq]: req.body.username
[Op.eq]: req.body.username || ''
},
admin: {
[Op.not]: true
@@ -27,7 +27,7 @@ const route = async (req, res) => {
//forcibly logout
tokens.destroy({
where: {
username: req.body.username
username: req.body.username || ''
}
});