mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 07:16:17 +08:00
fix: lower accuracy requirement for accounts that have opted out of the leaderboards
actually closes #5858
This commit is contained in:
parent
c7b3e2c916
commit
3478c21aa9
|
@ -200,6 +200,10 @@ export async function addResult(
|
|||
throw new MonkeyError(status.code, status.message);
|
||||
}
|
||||
|
||||
if (user.lbOptOut !== true && completedEvent.acc < 75) {
|
||||
throw new MonkeyError(400, "Accuracy too low");
|
||||
}
|
||||
|
||||
const resulthash = completedEvent.hash;
|
||||
if (req.ctx.configuration.results.objectHashCheckEnabled) {
|
||||
const objectToHash = omit(completedEvent, "hash");
|
||||
|
|
|
@ -53,7 +53,7 @@ const ResultBaseSchema = z.object({
|
|||
wpm: WpmSchema,
|
||||
rawWpm: WpmSchema,
|
||||
charStats: CharStatsSchema,
|
||||
acc: PercentageSchema.min(75),
|
||||
acc: PercentageSchema.min(50),
|
||||
mode: ModeSchema,
|
||||
mode2: Mode2Schema,
|
||||
quoteLength: z.number().int().nonnegative().max(3).optional(),
|
||||
|
|
Loading…
Reference in a new issue