mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-29 10:17:30 +08:00
fixed a bug where new result tags could not be updated before refreshing the page
This commit is contained in:
parent
18dff0858c
commit
6b8f3d8019
2 changed files with 3 additions and 0 deletions
|
|
@ -482,6 +482,7 @@ exports.testCompleted = functions.https.onCall((request, response) => {
|
|||
.collection(`users/${request.uid}/results`)
|
||||
.add(obj)
|
||||
.then((e) => {
|
||||
let createdDocId = e.id;
|
||||
return Promise.all([
|
||||
checkLeaderboards(request.obj, "global", banned, name),
|
||||
checkLeaderboards(request.obj, "daily", banned, name),
|
||||
|
|
@ -525,6 +526,7 @@ exports.testCompleted = functions.https.onCall((request, response) => {
|
|||
dailyLeaderboard: dailylb,
|
||||
lbBanned: banned,
|
||||
name: name,
|
||||
createdId: createdDocId,
|
||||
};
|
||||
|
||||
if (ispb) {
|
||||
|
|
|
|||
|
|
@ -1235,6 +1235,7 @@ function showResult(difficultyFailed = false) {
|
|||
6000
|
||||
);
|
||||
} else if (e.data.resultCode === 1 || e.data.resultCode === 2) {
|
||||
completedEvent.id = e.data.createdId;
|
||||
dbSnapshot.results.unshift(completedEvent);
|
||||
try {
|
||||
firebase
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue