mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 21:51:29 +08:00
Revert "removing custom text from the hash"
This reverts commit 3b01cd4f19.
This commit is contained in:
parent
3b01cd4f19
commit
7ee40b6b6f
2 changed files with 2 additions and 5 deletions
|
|
@ -75,7 +75,6 @@ class ResultController {
|
|||
const resulthash = result.hash;
|
||||
delete result.hash;
|
||||
delete result.strigified;
|
||||
delete result.customText;
|
||||
if (
|
||||
req.ctx.configuration.resultObjectHashCheck.enabled &&
|
||||
resulthash.length === 64
|
||||
|
|
|
|||
|
|
@ -1071,7 +1071,7 @@ export async function addWord(): Promise<void> {
|
|||
interface CompletedEvent extends MonkeyTypes.Result<MonkeyTypes.Mode> {
|
||||
keySpacing: number[] | "toolong";
|
||||
keyDuration: number[] | "toolong";
|
||||
customText?: MonkeyTypes.CustomText;
|
||||
customText: MonkeyTypes.CustomText;
|
||||
smoothConsistency: number;
|
||||
wpmConsistency: number;
|
||||
lang: string;
|
||||
|
|
@ -1500,9 +1500,7 @@ export async function finish(difficultyFailed = false): Promise<void> {
|
|||
AccountButton.loading(true);
|
||||
completedEvent.challenge = ChallengeContoller.verify(completedEvent);
|
||||
if (completedEvent.challenge === null) delete completedEvent?.challenge;
|
||||
const toHash = Object.assign({}, completedEvent);
|
||||
delete toHash.customText;
|
||||
completedEvent.hash = objecthash(toHash);
|
||||
completedEvent.hash = objecthash(completedEvent);
|
||||
|
||||
const response = await Ape.results.save(completedEvent);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue