Commit 3fb2b1f0 authored by nanahira's avatar nanahira

protect index of challonge

parent c93a15e8
...@@ -294,7 +294,10 @@ if settings.modules.challonge.enabled ...@@ -294,7 +294,10 @@ if settings.modules.challonge.enabled
else else
_data.callback = get_callback(0, _data.callback) _data.callback = get_callback(0, _data.callback)
is_requesting[0] = moment() is_requesting[0] = moment()
try
challonge.participants.index(_data) challonge.participants.index(_data)
catch err
_data.callback(err, null)
return return
challonge.matches._index = (_data) -> challonge.matches._index = (_data) ->
if settings.modules.challonge.cache_ttl and challonge_cache[1] if settings.modules.challonge.cache_ttl and challonge_cache[1]
...@@ -304,7 +307,10 @@ if settings.modules.challonge.enabled ...@@ -304,7 +307,10 @@ if settings.modules.challonge.enabled
else else
_data.callback = get_callback(1, _data.callback) _data.callback = get_callback(1, _data.callback)
is_requesting[1] = moment() is_requesting[1] = moment()
try
challonge.matches.index(_data) challonge.matches.index(_data)
catch err
_data.callback(err, null)
return return
challonge.matches._update = (_data) -> challonge.matches._update = (_data) ->
try try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment