single-line change to make unlisted levels work

This commit is contained in:
Jill 2023-01-02 17:07:18 +03:00
parent 903a7dd869
commit 50c3f00035
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ CrystalGauntlet.endpoints["/getGJLevels21.php"] = ->(body : String): String {
if searchQuery != ""
if searchQuery.to_i?
queryParams << "levels.id = #{searchQuery.to_i}"
# we do this to get rid of the initial "unlisted = 0" bit
queryParams = ["levels.id = #{searchQuery.to_i}"]
else
# no sql injections to see here; clean_char only leaves A-Za-z0-9 intact
# todo: make this configurable w/ fuzzy search