Skip to content

Commit

Permalink
Properly read suspect url from request
Browse files Browse the repository at this point in the history
  • Loading branch information
mia-pi-git committed Oct 24, 2024
1 parent 8241340 commit 0f5a8f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0f5a8f4

Please sign in to comment.