Skip to content

Commit b6935a5

Browse files
committed
correcting env variable in code
1 parent 597b04e commit b6935a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/middleware/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const auth = async (req, res, next)=>{
66
// next()
77
try{
88
const token = req.header('Authorization').replace('Bearer ', '')
9-
const decoded = jwt.verify(token, process.env.JWT_SECRE)
9+
const decoded = jwt.verify(token, process.env.JWT_SECRET)
1010
const user = await User.findById({_id: decoded._id, 'tokens.token': token})
1111
// const tokenExp = decoded.exp
1212
// const date=Math.round(new Date().getTime()/1000 )

0 commit comments

Comments
 (0)