fix: check for total challenge completion before donation pop up (#57425)

This commit is contained in:
Ahmad Abdolsaheb
2024-12-14 00:56:06 +03:00
committed by GitHub
parent 1690afeb95
commit bf253db285
4 changed files with 57 additions and 16 deletions

View File

@@ -5,8 +5,15 @@ const blankUserId = new ObjectId('5bd30e0f1caf6ac3ddddddb9');
const publicUserId = new ObjectId('663b839b24a8b29f57728b13');
const demoUserId = new ObjectId('5bd30e0f1caf6ac3ddddddb5');
const fullyCertifiedUserId = new ObjectId('5fa2db00a25c1c1fa49ce067');
const almostFullyCertifiedUserId = new ObjectId('5bd30e0f1caf6ac3ddddddb9');
const userIds = [blankUserId, publicUserId, demoUserId, fullyCertifiedUserId];
const userIds = [
blankUserId,
publicUserId,
demoUserId,
fullyCertifiedUserId,
almostFullyCertifiedUserId
];
module.exports.blankUser = {
_id: blankUserId,
@@ -12287,4 +12294,13 @@ module.exports.fullyCertifiedUser = {
unsubscribeId: 'tBX8stC5jiustPBteF2mV'
};
module.exports.almostFullyCertifiedUser = {
...module.exports.fullyCertifiedUser,
id: almostFullyCertifiedUserId,
completedChallenges:
module.exports.fullyCertifiedUser.completedChallenges.filter(
challenge => challenge.id !== 'bd7158d8c442eddfaeb5bd13'
)
};
module.exports.userIds = userIds;