Fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user