not checking leaderboards and pb if a funbox is active

This commit is contained in:
Jack 2020-12-07 19:05:19 +00:00
parent ebd90ff37c
commit 7808ab17b6

View file

@ -317,6 +317,9 @@ exports.checkNameAvailability = functions.https.onCall(
function checkIfPB(uid, obj, userdata) {
let pbs = null;
if (obj.funbox !== "none") {
return false;
}
try {
pbs = userdata.personalBests;
if (pbs === undefined) {
@ -1865,6 +1868,11 @@ async function checkLeaderboards(
// };
//
try {
if (resultObj.funbox !== "none") {
return {
insertedAt: null,
};
}
if (emailVerified === false)
return {
insertedAt: null,