From 4b47766d22fc9ee5dbc9a2401d0a23256c191def Mon Sep 17 00:00:00 2001 From: Karthik <32044378+Karthik99999@users.noreply.github.com> Date: Fri, 5 Jan 2024 19:34:13 -0500 Subject: [PATCH] Fix player name length check in `addreplay` action --- src/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions.ts b/src/actions.ts index 1df2958..d5e8113 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -189,8 +189,8 @@ export const actions: {[k: string]: QueryHandler} = { throw new ActionError("Required params: id, format, log, players", 400); } // player usernames cannot be longer than 18 characters - if (!params.players.split(',').some(p => p.length > 18)) { - throw new ActionError("Player names much be 18 chars or shorter", 400); + if (params.players.split(',').some(p => p.length > 18)) { + throw new ActionError("Player names must be 18 chars or shorter", 400); } // the battle ID must be valid // the format from the battle ID must match the format ID