0
0
Fork 0

Correct the erroneous history database saving

This commit is contained in:
Oliver-Akins 2021-09-29 22:31:01 -06:00
parent c1786bab56
commit b85fae5720
2 changed files with 10 additions and 2 deletions

View file

@ -50,7 +50,11 @@ export default {
});
let pastBrackets = await loadHistory(gID);
pastBrackets.push(db[gID].bracket.quotes);
pastBrackets.push({
version: 2,
date: new Date().toISOString(),
quotes: db[gID].bracket.quotes,
});
saveHistory(gID, pastBrackets);
// Calculate the winners from the previous bracket