mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
brought back email ver
This commit is contained in:
parent
3cc5bc46f6
commit
6c89b83de8
2 changed files with 10 additions and 3 deletions
|
@ -1383,7 +1383,7 @@ exports.testCompleted = functions.https.onRequest(async (request, response) => {
|
|||
// .then((user) => {
|
||||
// return user.emailVerified;
|
||||
// });
|
||||
emailVerified = true;
|
||||
// emailVerified = true;
|
||||
|
||||
// if (obj.funbox === "nospace") {
|
||||
// response.status(200).send({ data: { resultCode: -1 } });
|
||||
|
@ -2342,8 +2342,15 @@ exports.checkLeaderboards = functions.https.onRequest(
|
|||
return;
|
||||
}
|
||||
|
||||
let emailVerified = await admin
|
||||
.auth()
|
||||
.getUser(request.uid)
|
||||
.then((user) => {
|
||||
return user.emailVerified;
|
||||
});
|
||||
|
||||
try {
|
||||
if (request.emailVerified === false) {
|
||||
if (emailVerified === false) {
|
||||
response.status(200).send({
|
||||
data: {
|
||||
needsToVerifyEmail: true,
|
||||
|
|
|
@ -163,7 +163,7 @@ export function check(completedEvent) {
|
|||
CloudFunctions.checkLeaderboards({
|
||||
uid: completedEvent.uid,
|
||||
lbMemory: DB.getSnapshot().lbMemory,
|
||||
emailVerified: DB.getSnapshot().emailVerified,
|
||||
// emailVerified: DB.getSnapshot().emailVerified,
|
||||
name: DB.getSnapshot().name,
|
||||
banned: DB.getSnapshot().banned,
|
||||
verified: DB.getSnapshot().verified,
|
||||
|
|
Loading…
Reference in a new issue