fixed headers sent error

This commit is contained in:
SPRINX0\prochazka
2024-10-15 12:28:47 +02:00
parent 42601ff960
commit 41a3769c5f

View File

@@ -22,7 +22,8 @@ function unauthorizedResponse(req, res, text) {
// if (req.path == getExpressPath('/connections/list')) { // if (req.path == getExpressPath('/connections/list')) {
// return res.json([]); // return res.json([]);
// } // }
return res.sendStatus(401).send(text);
return res.status(401).send(text);
} }
function authMiddleware(req, res, next) { function authMiddleware(req, res, next) {