]> git.sesse.net Git - ultimatescore/blobdiff - update_sheets.js
Changes for NM 2020 (two groups, no 9th-13th round robin).
[ultimatescore] / update_sheets.js
index f4e01e635d83b4c5ecd75b159a6f9b6057605a8e..e58a086a7ff763843f8ea1f46b05fb6e597611eb 100644 (file)
@@ -394,7 +394,6 @@ function fill_playoff(replacements, teams) {
                };
                possibly_update_oauth_key(function() {
                        post_json('https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + '/values:batchUpdate?key=' + ultimateconfig['api_key'], json, function(response) {
-                               get_group('Playoffs 9th-13th', function(response_l) { publish_group_rank(response_l, 'Playoffs 9th-13th'); });
                        }, current_oauth_access_token);
                        post_json('https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + ':batchUpdate?key=' + ultimateconfig['api_key'], meta_json, function(response) {}, current_oauth_access_token);
                });
@@ -414,17 +413,13 @@ function get_results(sheet_name, cb)
 function publish_group_ranks() {
        get_group('Group A', function(response_a) {
                get_group('Group B', function(response_b) {
-                       get_group('Group C', function(response_c) {
                                publish_group_rank(response_a, 'Group A');
                                publish_group_rank(response_b, 'Group B');
-                               publish_group_rank(response_c, 'Group C');
 
-                               let replacements = montecarlo([response_a, response_b, response_c]);
+                               let replacements = montecarlo([response_a, response_b]);
                                let team_a = parse_teams_from_spreadsheet(response_a);
                                let team_b = parse_teams_from_spreadsheet(response_b);
-                               let team_c = parse_teams_from_spreadsheet(response_c);
-                               fill_playoff(replacements, [team_a, team_b, team_c]);
-                       });
+                               fill_playoff(replacements, [team_a, team_b]);
                });
        });
 }