diff --git a/api/modules/token.js b/api/modules/token.js index e849972..51c650f 100644 --- a/api/modules/token.js +++ b/api/modules/token.js @@ -5,7 +5,7 @@ import { pool } from './database.js'; // Generate a new JWT const generateToken = async (userId, password) => { - return token = await jwt.sign({ userId: userId, password: password }, process.env.JWT_SECRET, { expiresIn: '7d' }); + return await jwt.sign({ userId: userId, password: password }, process.env.JWT_SECRET, { expiresIn: '7d' }); }; // Middleware to verify the JWT and set req.userId