Revert "not sending key data when not needed"

Key data is needed to validate test

This reverts commit 2a7eab75be.
This commit is contained in:
Miodec 2022-03-16 20:48:42 +01:00
parent a5136dacc1
commit 389fe63a49
2 changed files with 4 additions and 7 deletions

View file

@ -34,10 +34,12 @@ const RESULT_SCHEMA = joi
keyConsistency: joi.number().required(),
keyDuration: joi
.alternatives()
.try(joi.array().items(joi.number()), joi.string().valid("toolong")),
.try(joi.array().items(joi.number()), joi.string().valid("toolong"))
.required(),
keySpacing: joi
.alternatives()
.try(joi.array().items(joi.number()), joi.string().valid("toolong")),
.try(joi.array().items(joi.number()), joi.string().valid("toolong"))
.required(),
lang: joi.string(),
language: joi.string().required(),
lazyMode: joi.boolean().required(),

View file

@ -1208,11 +1208,6 @@ function buildCompletedEvent(difficultyFailed: boolean): CompletedEvent {
afkDuration: undefined,
};
if (Config.mode !== "time") {
delete completedEvent.keySpacing;
delete completedEvent.keyDuration;
}
// stats
const stats = TestStats.calculateStats();
if (stats.time % 1 != 0 && Config.mode !== "time") {