Commit 5faacb7e authored by nanahira's avatar nanahira

Merge branch 'master' into ai-play

parents 699f4dfc 260253aa
Pipeline #14350 failed with stages
in 9 minutes and 6 seconds
......@@ -28,6 +28,7 @@ class Challonge {
include_participants: 1,
include_matches: 1,
},
timeout: 5000,
});
this.previous = tournament;
this.previousTime = (0, moment_1.default)();
......
......@@ -176,6 +176,7 @@ export class Challonge {
include_participants: 1,
include_matches: 1,
},
timeout: 5000,
},
);
this.previous = tournament;
......
......@@ -338,7 +338,7 @@ init = () ->
imported = true
#import the old Challonge api key option
if settings.modules.challonge.options
settings.modules.challonge.api_key = settings.modules.challonge.options.api_key
settings.modules.challonge.api_key = settings.modules.challonge.options.apiKey
delete settings.modules.challonge.options
imported = true
#import the old random_duel.blank_pass_match option
......@@ -1262,7 +1262,7 @@ class Room
@established = false
@watcher_buffers = []
@recorder_buffers = []
@cloud_replay_id = Math.floor(Math.random()*100000000)
@cloud_replay_id = Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)
@watchers = []
@random_type = ''
@welcome = ''
......
......@@ -438,7 +438,7 @@
}
//import the old Challonge api key option
if (settings.modules.challonge.options) {
settings.modules.challonge.api_key = settings.modules.challonge.options.api_key;
settings.modules.challonge.api_key = settings.modules.challonge.options.apiKey;
delete settings.modules.challonge.options;
imported = true;
}
......@@ -1658,7 +1658,7 @@
this.established = false;
this.watcher_buffers = [];
this.recorder_buffers = [];
this.cloud_replay_id = Math.floor(Math.random() * 100000000);
this.cloud_replay_id = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);
this.watchers = [];
this.random_type = '';
this.welcome = '';
......
......@@ -158,14 +158,14 @@ const UploadToChallonge = async function () {
sendResponse("开始清空 Challonge 玩家列表。");
await axios.delete(`https://api.challonge.com/v1/tournaments/${challonge_config.tournament_id}/participants/clear.json`, {
params: {
api_key: challonge_config.options.apiKey
api_key: challonge_config.api_key
}
});
sendResponse("开始上传玩家列表至 Challonge。");
for (const chunk of _.chunk(player_list, 10)) {
sendResponse(`开始上传玩家 ${chunk.join(', ')} 至 Challonge。`);
await axios.post(`https://api.challonge.com/v1/tournaments/${challonge_config.tournament_id}/participants/bulk_add.json`, {
api_key: challonge_config.options.apiKey,
api_key: challonge_config.api_key,
participants: chunk.map(name => ({ name })),
});
}
......
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