fixed a bug where leaderboards would override eachother when going to history

This commit is contained in:
Jack 2020-07-05 16:36:55 +01:00
parent 678d4932df
commit ee98123772

View file

@ -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(
{