Skip to content

Commit

Permalink
fix: Device not connected error
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Jul 22, 2022
1 parent e49671e commit 2a5f16d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/middleware/auth.js
Expand Up @@ -54,11 +54,7 @@ const verifyToken = (req, res, next) => {
req.session = formatSession(req.params.session);
req.token = tokenDecrypt;
req.client = clientsArray[req.session];
if (!req.client || req.client.status === null) {
res.status(401).json({ error: 'Your session is not connected' });
} else {
next();
}
next();
} else {
return res.status(401).json({ error: 'Check that the Session and Token are correct' });
}
Expand Down

0 comments on commit 2a5f16d

Please sign in to comment.