Commit 19f373f0 authored by nanahira's avatar nanahira

add deck_dashboard_min_deck

parent 9c862f3b
Pipeline #36990 failed with stages
in 5 minutes and 50 seconds
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
"show_ip": true, "show_ip": true,
"show_info": true, "show_info": true,
"log_save_path": "./config/", "log_save_path": "./config/",
"deck_dashboard_min_deck": 40,
"port": 7933 "port": 7933
}, },
"athletic_check": { "athletic_check": {
......
...@@ -176,7 +176,7 @@ const receiveDecks = function(files, callback) { ...@@ -176,7 +176,7 @@ const receiveDecks = function(files, callback) {
_async.eachSeries(files, async(file) => { _async.eachSeries(files, async(file) => {
if (_.endsWith(file.name, ".ydk")) { if (_.endsWith(file.name, ".ydk")) {
const deck = await readDeck(file.name, file.path); const deck = await readDeck(file.name, file.path);
if (deck.main.length >= 40) { if (deck.main.length >= (config.deck_dashboard_min_deck || 40)) {
fs.createReadStream(file.path).pipe(fs.createWriteStream(config.deck_path + file.name)); fs.createReadStream(file.path).pipe(fs.createWriteStream(config.deck_path + file.name));
result.push({ result.push({
file: file.name, file: file.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