From 433f3069b305f4d5380b09c0810db8a308fad3a0 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Tue, 31 Dec 2024 16:27:07 -0500 Subject: [PATCH] Fix another bug on lastprofile at loggin --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9e2c48a..f556a57 100644 --- a/index.js +++ b/index.js @@ -182,7 +182,7 @@ DB.getDB.then((DB) => { res.cookie('session_id', sessionObj.insertedId, cookiesOptions); // Chooses the most recent update profile as current active profile const latestUpdatedProfile = await DB.latestProfile(user._id); - res.cookie('profile_id', latestProfile._id, cookiesOptions); + res.cookie('profile_id', latestUpdatedProfile._id, cookiesOptions); return res.json({ status: "ok", user_sid: user._id,