From c885c41be1e860cd700f4cd7c88f28aeab8bf5e4 Mon Sep 17 00:00:00 2001 From: Ahamed Reezan Saleem Date: Mon, 22 Apr 2024 05:43:39 +0530 Subject: [PATCH] Testing --- middleware/requireAuth.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/middleware/requireAuth.js b/middleware/requireAuth.js index de2d10d..2eb89ff 100644 --- a/middleware/requireAuth.js +++ b/middleware/requireAuth.js @@ -25,6 +25,8 @@ const requireAuth = async (req, res, next) => { // Verify the token using the secret key const { id } = jwt.verify(token, secret); + console.log(id); + // Retrieve user data from API using the id and role from the token const { data } = await axios.get(`${backendUrl}/api/users/${id}`);