Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sweepstakes from sports creation #3483

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions backend/scripts/fetch-sports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ async function fetchUpcomingSportsGamesForLeague(
const data = await response.json()
const schedule = data?.schedule
if (schedule && Array.isArray(schedule)) {
const today = new Date()
const oneWeekLater = new Date()
oneWeekLater.setDate(today.getDate() + 7)

return schedule.filter((sportsGame: SportsGames) => {
const sportsGameDate = new Date(sportsGame.dateEvent)
return sportsGameDate >= today && sportsGameDate <= oneWeekLater
})
return schedule
} else {
console.log(`No sports games found for league ${leagueId}.`)
return []
Expand Down Expand Up @@ -80,7 +73,7 @@ async function fetchUpcomingSportsGames() {

const flattenedSportsGames = allSportsGames.flat()
if (flattenedSportsGames.length === 0) {
console.log('No sports games found for the next week across all leagues.')
console.log('No sports games found across all leagues.')
return
}

Expand Down
2 changes: 1 addition & 1 deletion web/pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function AdminPage() {
<p>Are you sure you want to create new sports markets?</p>
<p>
Make sure you are logged into the Manifold account and have
~40,000 mana and 2000 sweepcash.
~50,000 mana.
</p>
</ConfirmationButton>
{isFinished && (
Expand Down