Skip to content

Commit

Permalink
Last fix. Matches are correctly deleted now.
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-flynn committed Oct 10, 2019
1 parent 3607898 commit b394553
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ems-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"main": "build/electron.js",
"dependencies": {
"@the-orange-alliance/lib-ems": "^0.7.17",
"@the-orange-alliance/lib-ems": "^0.7.19",
"axios": "^0.19.0",
"dotenv": "^8.0.0",
"local-ipv4-address": "0.0.2",
Expand Down
3 changes: 2 additions & 1 deletion ems-core/src/managers/FGCUploadManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class FGCUploadedManager {

public postMatchSchedule(eventKey: string, matches: Match[]): Promise<any> {
return new Promise<any>((resolve, reject) => {
FGCProvider.deleteMatchData(eventKey, matches[0].tournamentLevel).then(() => {
const tournamentKey: string = matches[0].matchKey.split("-")[3].substring(0, 2);
FGCProvider.deleteMatchData(eventKey, matches[0].tournamentLevel, matches[0].tournamentLevel > Match.QUALIFICATION_LEVEL ? tournamentKey : undefined).then(() => {
setTimeout(() => {
const fgcMatches: Match[] = matches.map((m: Match) => m);
const fgcDetails: MatchDetails[] = matches.map((m: Match) => new MatchDetails().fromJSON({match_key: m.matchKey, match_detail_key: m.matchDetailKey}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function mapStateToProps({configState, internalState}: IApplicationState) {
return {
event: configState.event,
eventConfig: configState.eventConfiguration,
team: internalState.teamList,
teams: internalState.teamList,
toaConfig: configState.toaConfig,
playoffsSchedule: configState.playoffsSchedule,
playoffsMatches: internalState.playoffsMatches
Expand Down

0 comments on commit b394553

Please sign in to comment.