not giving role if not verified

This commit is contained in:
Jack 2020-07-24 15:01:53 +01:00
parent ad6e01da9f
commit 7f3acbb8f3

View file

@ -569,10 +569,15 @@ exports.testCompleted = functions.https.onCall(async (request, response) => {
userdata.discordId !== null &&
userdata.discordId !== undefined
) {
console.log(
`sending command to the bot to update the role for user ${request.uid} with wpm ${obj.wpm}`
);
updateDiscordRole(userdata.discordId, Math.round(obj.wpm));
if (verified !== false) {
console.log(
`sending command to the bot to update the role for user ${request.uid} with wpm ${obj.wpm}`
);
updateDiscordRole(
userdata.discordId,
Math.round(obj.wpm)
);
}
}
returnobj.resultCode = 2;
} else {