Showing 2 of 5 total issues
Function verifyToken
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const verifyToken = (req, res, next) => {
const token = req.header('Authorization');
if (!token) {
return res.status(401).json({
error: 'Authorization token not provided, access denied',
Avoid too many return
statements within this function. Open
Open
return false;