Spaces:
Sleeping
Sleeping
matt HOFFNER
commited on
Commit
·
5f213cb
1
Parent(s):
5935dee
fix typo
Browse files- app/tools/odds.ts +2 -3
app/tools/odds.ts
CHANGED
@@ -14,7 +14,6 @@ function createOddsApi({ apiKey }: { apiKey: string }) {
|
|
14 |
const dateFormat = 'iso';
|
15 |
const regions = 'us';
|
16 |
let sportKey;
|
17 |
-
|
18 |
let market;
|
19 |
|
20 |
// americanfootball_nfl_super_bowl_winner
|
@@ -27,11 +26,11 @@ function createOddsApi({ apiKey }: { apiKey: string }) {
|
|
27 |
}
|
28 |
|
29 |
if (input.includes('money line')) {
|
30 |
-
market = '
|
31 |
} else if (input.includes('o/u')) {
|
32 |
market = 'totals';
|
33 |
} else {
|
34 |
-
market = '
|
35 |
}
|
36 |
const activeSports = await fetch(`https://api.the-odds-api.com/v4/sports/${sportKey}/odds?apiKey=${apiKey}&oddsFormat=${oddsFormat}&dateFormat=${dateFormat}&market=${market}®ions=${regions}`);
|
37 |
const oddsResponse = await activeSports.json();
|
|
|
14 |
const dateFormat = 'iso';
|
15 |
const regions = 'us';
|
16 |
let sportKey;
|
|
|
17 |
let market;
|
18 |
|
19 |
// americanfootball_nfl_super_bowl_winner
|
|
|
26 |
}
|
27 |
|
28 |
if (input.includes('money line')) {
|
29 |
+
market = 'h2h';
|
30 |
} else if (input.includes('o/u')) {
|
31 |
market = 'totals';
|
32 |
} else {
|
33 |
+
market = 'spreads';
|
34 |
}
|
35 |
const activeSports = await fetch(`https://api.the-odds-api.com/v4/sports/${sportKey}/odds?apiKey=${apiKey}&oddsFormat=${oddsFormat}&dateFormat=${dateFormat}&market=${market}®ions=${regions}`);
|
36 |
const oddsResponse = await activeSports.json();
|