Added body support

This commit is contained in:
2023-12-08 03:03:47 +01:00
parent 16fdb7a444
commit 6e6bdc21ba

View File

@@ -64,7 +64,7 @@ router.post('/login', requestLimiter, async (req, res) => {
});
router.post('/verify', requestLimiter, async (req, res) => {
const token = req.headers.authorization;
const token = req.headers.authorization || req.body.token;
if (!token) return await respondWithStatus(res, 401, 'No token provided');
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET);