From 5d2be6584ecb6c0e297fbb0fd1b0d0a3e1e4dfb7 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Thu, 7 Dec 2023 23:47:47 +0100 Subject: [PATCH] Fix --- api/modules/token.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/modules/token.js b/api/modules/token.js index 208a1cf..e849972 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 = jwt.sign({ userId: userId, password: password }, process.env.JWT_SECRET, { expiresIn: '7d' }); + return token = await jwt.sign({ userId: userId, password: password }, process.env.JWT_SECRET, { expiresIn: '7d' }); }; // Middleware to verify the JWT and set req.userId