Merge pull request #9878 from nnickoloff1234/tournament-home-html-vs-api-mobile

Mobile app to show team tournaments
pull/9903/head
Thibault Duplessis 2021-09-29 08:59:25 +02:00 committed by GitHub
commit f97fa4fbe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -57,7 +57,10 @@ final class Tournament(
api = _ =>
for {
(visible, _) <- upcomingCache.getUnit
scheduleJson <- env.tournament apiJsonView visible
teamIds <- ctx.userId.??(env.team.cached.teamIdsList)
allTeamIds = (env.featuredTeamsSetting.get().value ++ teamIds).distinct
teamVisible <- repo.visibleForTeams(allTeamIds, 5 * 60)
scheduleJson <- env.tournament.apiJsonView(visible add teamVisible)
} yield Ok(scheduleJson)
)
}