From ee98123772f72911e8d109458725d56d97567a79 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 5 Jul 2020 16:36:55 +0100 Subject: [PATCH] fixed a bug where leaderboards would override eachother when going to history --- functions/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index 9067e3fdd..55de17433 100644 --- a/functions/index.js +++ b/functions/index.js @@ -993,7 +993,11 @@ exports.scheduledFunctionCrontab = functions.pubsub admin .firestore() .collection("leaderboards_history") - .doc(`${t.getDate()}_${t.getMonth()}_${t.getFullYear()}`) + .doc( + `${t.getDate()}_${t.getMonth()}_${t.getFullYear()}_${ + lbdata.mode + }_${lbdata.mode2}` + ) .set(lbdata); admin.firestore().collection("leaderboards").doc(doc.id).set( {