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
+1 -1
View File
@@ -12,7 +12,7 @@ router.use(tokenAuth);
router.use(async (req, res, next) => {
const record = await accounts.findOne({
where: {
username: req.user.username
username: req.user.username || ''
}
});