Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
bfae6a09
Commit
bfae6a09
authored
May 29, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mc'
parents
e48aa151
9cc2a48d
Pipeline
#13288
failed with stages
in 5 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ygopro-tournament.js
ygopro-tournament.js
+2
-2
No files found.
ygopro-tournament.js
View file @
bfae6a09
...
@@ -158,14 +158,14 @@ const UploadToChallonge = async function () {
...
@@ -158,14 +158,14 @@ const UploadToChallonge = async function () {
sendResponse
(
"
开始清空 Challonge 玩家列表。
"
);
sendResponse
(
"
开始清空 Challonge 玩家列表。
"
);
await
axios
.
delete
(
`https://api.challonge.com/v1/tournaments/
${
challonge_config
.
tournament_id
}
/participants/clear.json`
,
{
await
axios
.
delete
(
`https://api.challonge.com/v1/tournaments/
${
challonge_config
.
tournament_id
}
/participants/clear.json`
,
{
params
:
{
params
:
{
api_key
:
challonge_config
.
options
.
apiK
ey
api_key
:
challonge_config
.
api_k
ey
}
}
});
});
sendResponse
(
"
开始上传玩家列表至 Challonge。
"
);
sendResponse
(
"
开始上传玩家列表至 Challonge。
"
);
for
(
const
chunk
of
_
.
chunk
(
player_list
,
10
))
{
for
(
const
chunk
of
_
.
chunk
(
player_list
,
10
))
{
sendResponse
(
`开始上传玩家
${
chunk
.
join
(
'
,
'
)}
至 Challonge。`
);
sendResponse
(
`开始上传玩家
${
chunk
.
join
(
'
,
'
)}
至 Challonge。`
);
await
axios
.
post
(
`https://api.challonge.com/v1/tournaments/
${
challonge_config
.
tournament_id
}
/participants/bulk_add.json`
,
{
await
axios
.
post
(
`https://api.challonge.com/v1/tournaments/
${
challonge_config
.
tournament_id
}
/participants/bulk_add.json`
,
{
api_key
:
challonge_config
.
options
.
apiK
ey
,
api_key
:
challonge_config
.
api_k
ey
,
participants
:
chunk
.
map
(
name
=>
({
name
})),
participants
:
chunk
.
map
(
name
=>
({
name
})),
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment