Implemented the challenge accept and decline buttons

TODO: Delete room when the challenged user declines the challenge
This commit is contained in:
Moon Patel
2023-07-06 23:07:15 +05:30
parent 882837448c
commit 3f22a674e7
4 changed files with 44 additions and 13 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ router.get(
let { userData } = req;
let challenges = await Challenge.find({ challenged: userData.username });
if (!challenges) challenges = [];
console.log("Challenges to", username, challenges);
console.log("Challenges to", userData.username, challenges);
res.json({ success: true, challenges: challenges });
})
);