mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-24 23:55:38 +08:00
Merge branch 'master' into newads
This commit is contained in:
commit
4262144c85
3 changed files with 5 additions and 0 deletions
|
@ -322,6 +322,7 @@ export async function addResult(
|
|||
delete result.keyOverlap;
|
||||
delete result.lastKeyToEnd;
|
||||
delete result.startToFirstKey;
|
||||
delete result.charTotal;
|
||||
|
||||
if (req.ctx.configuration.users.lastHashesCheck.enabled) {
|
||||
let lastHashes = user.lastReultHashes ?? [];
|
||||
|
|
|
@ -8,6 +8,7 @@ const RESULT_SCHEMA = joi
|
|||
blindMode: joi.boolean().required(),
|
||||
challenge: joi.string(),
|
||||
charStats: joi.array().items(joi.number().min(0)).required(),
|
||||
charTotal: joi.number().min(0),
|
||||
chartData: joi
|
||||
.alternatives()
|
||||
.try(
|
||||
|
|
|
@ -1307,6 +1307,7 @@ interface CompletedEvent extends MonkeyTypes.Result<MonkeyTypes.Mode> {
|
|||
keyOverlap: number;
|
||||
lastKeyToEnd: number;
|
||||
startToFirstKey: number;
|
||||
charTotal: number;
|
||||
}
|
||||
|
||||
type PartialCompletedEvent = Omit<Partial<CompletedEvent>, "chartData"> & {
|
||||
|
@ -1359,6 +1360,7 @@ function buildCompletedEvent(difficultyFailed: boolean): CompletedEvent {
|
|||
wpm: undefined,
|
||||
rawWpm: undefined,
|
||||
charStats: undefined,
|
||||
charTotal: undefined,
|
||||
acc: undefined,
|
||||
mode: Config.mode,
|
||||
mode2: undefined,
|
||||
|
@ -1414,6 +1416,7 @@ function buildCompletedEvent(difficultyFailed: boolean): CompletedEvent {
|
|||
stats.extraChars,
|
||||
stats.missedChars,
|
||||
];
|
||||
completedEvent.charTotal = stats.allChars;
|
||||
completedEvent.acc = stats.acc;
|
||||
|
||||
// if the last second was not rounded, add another data point to the history
|
||||
|
|
Loading…
Add table
Reference in a new issue