add uniform parsing and catching for arrays, remove redundant check

This commit is contained in:
Michael C
2022-09-25 03:30:33 -04:00
parent 506b6570f3
commit a469f2f382
3 changed files with 37 additions and 30 deletions

View File

@@ -73,11 +73,6 @@ export async function getTopUsers(req: Request, res: Response): Promise<Response
const sortType = parseInt(req.query.sortType as string);
const categoryStatsEnabled = req.query.categoryStats;
if (sortType == undefined) {
//invalid request
return res.sendStatus(400);
}
//setup which sort type to use
let sortBy = "";
if (sortType == 0) {