fix invitation and registration to use lowercase

This commit is contained in:
Adolfo Reyna
2025-02-11 11:34:28 -05:00
parent 222d203a57
commit 50ed0e2c7d

View File

@@ -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";