mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-07 04:04:03 +08:00
fix(server): only saving isPb property in the database if the result was a pb
this was the previous behaviour but #4980 broke it
This commit is contained in:
parent
6c1c22787d
commit
ead765d57a
2 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,7 @@ export function buildDbResult(
|
|||
if (ce.incompleteTestSeconds === 0) delete res.incompleteTestSeconds;
|
||||
if (ce.afkDuration === 0) delete res.afkDuration;
|
||||
if (ce.tags.length === 0) delete res.tags;
|
||||
if (ce.isPb === false) delete res.isPb;
|
||||
|
||||
if (ce.keySpacingStats === undefined) delete res.keySpacingStats;
|
||||
if (ce.keyDurationStats === undefined) delete res.keyDurationStats;
|
||||
|
|
2
shared-types/types.d.ts
vendored
2
shared-types/types.d.ts
vendored
|
@ -219,6 +219,7 @@ declare namespace SharedTypes {
|
|||
| "incompleteTests"
|
||||
| "customText"
|
||||
| "quoteLength"
|
||||
| "isPb"
|
||||
> & {
|
||||
correctChars?: number; // --------------
|
||||
incorrectChars?: number; // legacy results
|
||||
|
@ -239,6 +240,7 @@ declare namespace SharedTypes {
|
|||
tags?: string[];
|
||||
customText?: CustomText;
|
||||
quoteLength?: number;
|
||||
isPb?: boolean;
|
||||
}
|
||||
>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue