From 0f5a8f420072307e388233a2bd453211f4d799e4 Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:50:58 -0500 Subject: [PATCH] Properly read suspect url from request --- src/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions.ts b/src/actions.ts index 69f79aa..611e64e 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -1047,13 +1047,13 @@ export const actions: {[k: string]: QueryHandler} = { throw new ActionError("Invalid reqs sent."); } // sim server should validate this already - if (!reqs.url?.trim().length) { + if (!params.url?.trim().length) { throw new ActionError("Invalid suspect URL provided."); } const start = time(); try { await smogonFetch("tools/api/suspect-create", "POST", { - url: reqs.url, + url: params.url, date: start + "", reqs: JSON.stringify(reqs), format: id,