Skip to content

Commit

Permalink
Also add tennis games from orbit
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelnindodev committed Oct 18, 2023
1 parent d606703 commit 60ab526
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/config/orbit.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"name": "Football",
"betType": "Three Way",
"url": "https://www.orbitxch.com/customer/sport/1"
},
{
"name": "Tennis",
"betType": "Two Way",
"url": "https://www.orbitxch.com/customer/sport/2"
}
]
}
4 changes: 4 additions & 0 deletions src/core/parsers/orbit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export class OrbitParser extends BaseParser {
case BetTypes.THREE_WAY:
results2 = processOrbitThreeWayGamesHtml(parsedMessage.rawHtml);
break;
case BetTypes.TWO_WAY:
// Thinking that the parser should also work for two way games
results2 = processOrbitThreeWayGamesHtml(parsedMessage.rawHtml);
break;
default:
const message = "Unknown bet type provided";
logger.error(message, {
Expand Down
2 changes: 1 addition & 1 deletion src/core/parsers/orbit/parser_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ export function processOrbitThreeWayGamesHtml(html: string): Result<any[], Error
logger.error("An error occurred while parsing Orbit three way html data: ", e.message);
return {result: "error", value: new Error(e.message)};
}
}
}

0 comments on commit 60ab526

Please sign in to comment.