Skip to content

Commit

Permalink
Update sprout.js
Browse files Browse the repository at this point in the history
  • Loading branch information
camillereaves authored Sep 23, 2023
1 parent ca0f5aa commit 50a8164
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions public/sprout.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,23 @@ function generateUsername(userNameExists, firstName, lastName, month, day, year)
async function testUserEmail(testEmail){
testEmail = testEmail.toString();
const emailCheck = await query(newUserRequest, where('UserEmail', '==', testEmail));
return emailCheck.exists;
if (emailCheck.exists){
return true;
} else{
return false;
}
}

async function testUserName(testUsername){
testUsername = testUsername.toString();
const docRef = doc(db, 'new_user_requests', testUsername);
const docCheck = await getDoc(docRef);
console.log(docCheck);
return docCheck.exists;
if (docCheck.exists){
return true;
} else{
return false;
}
}

function testValidationFunctions() {
Expand Down

0 comments on commit 50a8164

Please sign in to comment.