mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Parse numeric arguments in admin query condition URLs
This commit is contained in:
parent
d369c0b47c
commit
3981c8887d
1 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,9 @@ module.exports = class Handler
|
|||
hasLimit = false
|
||||
try
|
||||
for own key, val of req.query.conditions
|
||||
numeric = parseInt val, 10
|
||||
if not _.isNaN(numeric) and numeric + '' is val
|
||||
val = numeric
|
||||
query = query[key](val)
|
||||
hasLimit ||= key is 'limit'
|
||||
catch e
|
||||
|
|
Loading…
Reference in a new issue