<commit_before>import { Meteor } from 'meteor/meteor';
import { MethodHooks } from 'meteor/doctorpangloss:method-hooks';
import { lodash } from 'meteor/stevezhu:lodash';

MethodHooks.after('Games.addGame', (options) => {
	if (options.error) {
		return;
	} else if (options.result) {
		const gameId = options.result;

		let yourClubTeamId = Meteor.call('Teams.addTeam', gameId);
		let opponentTeamId = Meteor.call('Teams.addTeam', gameId);

		Meteor.call('Games.addTeamsId', gameId, yourClubTeamId, opponentTeamId);

		return options.result;
	}
});

MethodHooks.after('Games.deleteGame', (options) => {
	if (options.error) {
		return;
	} else if (options.result) {
		const gameId = options.arguments[0];

		Meteor.call('Teams.deleteTeams', gameId);
		Meteor.call('Players.deletePlayers', gameId);
		Meteor.call('Coachs.deleteCoachs', gameId);

		return options.result;
	}
});
<commit_msg>change variable from let to const<commit_after>import { Meteor } from 'meteor/meteor';
import { MethodHooks } from 'meteor/doctorpangloss:method-hooks';
import { lodash } from 'meteor/stevezhu:lodash';

MethodHooks.after('Games.addGame', (options) => {
	if (options.error) {
		return;
	} else if (options.result) {
		const gameId = options.result;

		const yourClubTeamId = Meteor.call('Teams.addTeam', gameId);
		const opponentTeamId = Meteor.call('Teams.addTeam', gameId);

		Meteor.call('Games.addTeamsId', gameId, yourClubTeamId, opponentTeamId);

		return options.result;
	}
});

MethodHooks.after('Games.deleteGame', (options) => {
	if (options.error) {
		return;
	} else if (options.result) {
		const gameId = options.arguments[0];

		Meteor.call('Teams.deleteTeams', gameId);
		Meteor.call('Players.deletePlayers', gameId);
		Meteor.call('Coachs.deleteCoachs', gameId);

		return options.result;
	}
});

{'fraction_non_alphanumeric': 0.15350389321468297, 'fraction_numerical': 0.0011123470522803114, 'mean_word_length': 5.077702702702703, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7456188', 'n_tokens_mistral': 702, 'n_tokens_neox': 635, 'n_words': 117}