X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=update_sheets.js;h=a656c89286f944211048ef070daf8ecb07fe7366;hb=693747756e9731f299c69c7374adc61c0d71450f;hp=aa4daa6a8559dbeeeed674da59352fa3ea910826;hpb=b0d7dd6f2006053313c3ef1f7fee4ccb14b14200;p=ultimatescore diff --git a/update_sheets.js b/update_sheets.js index aa4daa6..a656c89 100644 --- a/update_sheets.js +++ b/update_sheets.js @@ -74,6 +74,7 @@ function publish_group_rank(response, group_name) let teams = parse_teams_from_spreadsheet(response); let games = parse_games_from_spreadsheet(response, group_name, false); apply_games_to_teams(games, teams); + teams = filter_teams(teams, response); // Write the points total to the unsorted columns. if (config['point_total_start_row'] !== null) { @@ -359,7 +360,9 @@ function fill_playoff(replacements, teams) { "requests": meta_updates }; 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) {}, current_oauth_access_token); + 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); }); }); @@ -397,6 +400,7 @@ function get_ranked(response, group_name) { let teams = parse_teams_from_spreadsheet(response); let games = parse_games_from_spreadsheet(response, group_name, false); apply_games_to_teams(games, teams); + teams = filter_teams(teams, response); let tiebreakers = []; teams = rank(games, teams, 1, tiebreakers); return teams;