Commit 2e7f24b9 authored by nanahira's avatar nanahira

js

parent 3fb2b1f0
......@@ -338,6 +338,7 @@
});
};
challonge.participants._index = function(_data) {
var err;
if (settings.modules.challonge.cache_ttl && challonge_cache[0]) {
_data.callback(null, challonge_cache[0]);
} else if (is_requesting[0] && moment() - is_requesting[0] <= 5000) {
......@@ -345,10 +346,16 @@
} else {
_data.callback = get_callback(0, _data.callback);
is_requesting[0] = moment();
try {
challonge.participants.index(_data);
} catch (error1) {
err = error1;
_data.callback(err, null);
}
}
};
challonge.matches._index = function(_data) {
var err;
if (settings.modules.challonge.cache_ttl && challonge_cache[1]) {
_data.callback(null, challonge_cache[1]);
} else if (is_requesting[1] && moment() - is_requesting[1] <= 5000) {
......@@ -356,7 +363,12 @@
} else {
_data.callback = get_callback(1, _data.callback);
is_requesting[1] = moment();
try {
challonge.matches.index(_data);
} catch (error1) {
err = error1;
_data.callback(err, null);
}
}
};
challonge.matches._update = function(_data) {
......
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