Patched some holes when poking with curl

This commit is contained in:
2021-07-24 20:04:35 +10:00
parent 46ded91c41
commit c63e14ddf3
8 changed files with 49 additions and 26 deletions
+2 -2
View File
@@ -4,12 +4,12 @@ const { accounts } = require('../database/models');
const route = async (req, res) => {
const account = await accounts.findOne({
where: {
index: req.user.index
index: req.user.index || ''
}
});
if (!account) {
return res.status(401).send('Unknown account');
return res.status(401).end('Unknown account');
}
//respond with the private-facing data