Correct the erroneous history database saving
This commit is contained in:
parent
c1786bab56
commit
b85fae5720
2 changed files with 10 additions and 2 deletions
|
|
@ -50,7 +50,11 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
let pastBrackets = await loadHistory(gID);
|
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);
|
saveHistory(gID, pastBrackets);
|
||||||
|
|
||||||
// Calculate the winners from the previous bracket
|
// Calculate the winners from the previous bracket
|
||||||
|
|
|
||||||
6
server/src/types/database.d.ts
vendored
6
server/src/types/database.d.ts
vendored
|
|
@ -22,4 +22,8 @@ interface database {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type bracket_history = quote[];
|
interface bracket_history {
|
||||||
|
version: 2;
|
||||||
|
date: string;
|
||||||
|
quotes: quote[];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue