Fix
This commit is contained in:
@@ -64,15 +64,8 @@ router.post('/login', requestLimiter, async (req, res) => {
|
||||
});
|
||||
|
||||
router.post('/verify', requestLimiter, async (req, res) => {
|
||||
try {
|
||||
const token = req.headers.authorization;
|
||||
if (!token) return await respondWithStatus(res, 401, 'No token provided');
|
||||
}
|
||||
catch (error) {
|
||||
console.error(error);
|
||||
return await respondWithStatus(res, 500, 'An error has occured');
|
||||
}
|
||||
|
||||
const token = req.headers.authorization;
|
||||
if (!token) return await respondWithStatus(res, 401, 'No token provided');
|
||||
console.log(await jwt.verify(token, process.env.JWT_SECRET));
|
||||
try {
|
||||
const decoded = jwt.verify(token, process.env.JWT_SECRET);
|
||||
|
||||
Reference in New Issue
Block a user