From 50ed0e2c7dda8ca066566e18de99470b7fe2396b Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Tue, 11 Feb 2025 11:34:28 -0500 Subject: [PATCH] fix invitation and registration to use lowercase --- mongoDB.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoDB.js b/mongoDB.js index c9012e4..1ae10c9 100644 --- a/mongoDB.js +++ b/mongoDB.js @@ -73,7 +73,7 @@ const getDB = new Promise((resolve, reject) => { DB.newInvitation = (userid, name, email)=>{ const invitation = { responsable: new mongo.ObjectID(userid), - email, + email: email.toLowerCase(), name, ts: new Date() } @@ -88,6 +88,7 @@ const getDB = new Promise((resolve, reject) => { }; DB.getInvitation = (email)=>{ + email = email.toLowerCase(); return DB.invitationCol.findOne({email}).catch((err)=>{ console.log(err); return "System Error";