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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
MyCard
srvpro
Commits
9ea82a4b
Commit
9ea82a4b
authored
Jul 20, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support all options for Challonge
parent
b6d5fbe5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
data/default_config.json
data/default_config.json
+3
-1
ygopro-server.coffee
ygopro-server.coffee
+6
-3
ygopro-server.js
ygopro-server.js
+7
-3
No files found.
data/default_config.json
View file @
9ea82a4b
...
@@ -122,7 +122,9 @@
...
@@ -122,7 +122,9 @@
"post_detailed_score"
:
true
,
"post_detailed_score"
:
true
,
"post_score_midduel"
:
true
,
"post_score_midduel"
:
true
,
"cache_ttl"
:
60000
,
"cache_ttl"
:
60000
,
"api_key"
:
"123"
,
"options"
:
{
"apiKey"
:
"123"
},
"tournament_id"
:
"456"
,
"tournament_id"
:
"456"
,
"use_custom_module"
:
false
"use_custom_module"
:
false
},
},
...
...
ygopro-server.coffee
View file @
9ea82a4b
...
@@ -215,6 +215,11 @@ if settings.hostinfo.enable_priority or settings.hostinfo.enable_priority == fal
...
@@ -215,6 +215,11 @@ if settings.hostinfo.enable_priority or settings.hostinfo.enable_priority == fal
settings
.
hostinfo
.
duel_rule
=
4
settings
.
hostinfo
.
duel_rule
=
4
delete
settings
.
hostinfo
.
enable_priority
delete
settings
.
hostinfo
.
enable_priority
imported
=
true
imported
=
true
#import the old Challonge api key option
if
settings
.
modules
.
challonge
.
api_key
settings
.
modules
.
challonge
.
options
.
apiKey
=
settings
.
modules
.
challonge
.
api_key
delete
settings
.
modules
.
challonge
.
api_key
imported
=
true
#finish
#finish
if
imported
if
imported
setting_save
(
settings
)
setting_save
(
settings
)
...
@@ -341,9 +346,7 @@ if settings.modules.challonge.enabled
...
@@ -341,9 +346,7 @@ if settings.modules.challonge.enabled
challonge_module_name
=
'challonge'
challonge_module_name
=
'challonge'
if
settings
.
modules
.
challonge
.
use_custom_module
if
settings
.
modules
.
challonge
.
use_custom_module
challonge_module_name
=
settings
.
modules
.
challonge
.
use_custom_module
challonge_module_name
=
settings
.
modules
.
challonge
.
use_custom_module
challonge
=
require
(
challonge_module_name
).
createClient
({
challonge
=
require
(
challonge_module_name
).
createClient
(
settings
.
modules
.
challonge
.
options
)
apiKey
:
settings
.
modules
.
challonge
.
api_key
})
if
settings
.
modules
.
challonge
.
cache_ttl
if
settings
.
modules
.
challonge
.
cache_ttl
challonge_cache
=
[]
challonge_cache
=
[]
challonge_queue_callbacks
=
[[],
[]]
challonge_queue_callbacks
=
[[],
[]]
...
...
ygopro-server.js
View file @
9ea82a4b
...
@@ -233,6 +233,12 @@
...
@@ -233,6 +233,12 @@
imported
=
true
;
imported
=
true
;
}
}
if
(
settings
.
modules
.
challonge
.
api_key
)
{
settings
.
modules
.
challonge
.
options
.
apiKey
=
settings
.
modules
.
challonge
.
api_key
;
delete
settings
.
modules
.
challonge
.
api_key
;
imported
=
true
;
}
if
(
imported
)
{
if
(
imported
)
{
setting_save
(
settings
);
setting_save
(
settings
);
}
}
...
@@ -401,9 +407,7 @@
...
@@ -401,9 +407,7 @@
if
(
settings
.
modules
.
challonge
.
use_custom_module
)
{
if
(
settings
.
modules
.
challonge
.
use_custom_module
)
{
challonge_module_name
=
settings
.
modules
.
challonge
.
use_custom_module
;
challonge_module_name
=
settings
.
modules
.
challonge
.
use_custom_module
;
}
}
challonge
=
require
(
challonge_module_name
).
createClient
({
challonge
=
require
(
challonge_module_name
).
createClient
(
settings
.
modules
.
challonge
.
options
);
apiKey
:
settings
.
modules
.
challonge
.
api_key
});
if
(
settings
.
modules
.
challonge
.
cache_ttl
)
{
if
(
settings
.
modules
.
challonge
.
cache_ttl
)
{
challonge_cache
=
[];
challonge_cache
=
[];
}
}
...
...
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