Chipping away at writing the tests

This commit is contained in:
2022-06-11 00:32:51 +01:00
parent 7f9274eb3f
commit 423a4652c1
2 changed files with 88 additions and 1 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ const jwt = require('jsonwebtoken');
//middleware to authenticate the JWT token
module.exports = (req, res, next) => {
const authHeader = req.headers['authorization'];
const token = authHeader?.split (' ')[1]; //'Bearer token'
const token = authHeader?.split(' ')[1]; //'Bearer token'
if (!token) {
return res.status(401).send('No token found');