Skip to content

Commit

Permalink
Merge pull request #16368 from fitztrev/fix-build-error
Browse files Browse the repository at this point in the history
Fix Type Mismatch Error in build
  • Loading branch information
fitztrev authored Nov 8, 2024
2 parents d7c2e61 + 808a483 commit 99b713e
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app/controllers/TeamApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ final class TeamApi(env: Env, apiC: => Api) extends LilaController(env):
yield leads

def teamsOf(username: UserStr) = AnonOrScoped(): ctx ?=>
import env.team.jsonView.given
JsonOk:
for
ids <- api.joinedTeamIdsOfUserAsSeenBy(username)
teams <- api.teamsByIds(ids)
teams <- env.team.memberRepo.addPublicLeaderIds(teams)
_ <- env.user.lightUserApi.preloadMany(teams.flatMap(_.publicLeaders))
yield teams
Found(meOrFetch(username)): user =>
import env.team.jsonView.given
JsonOk:
for
ids <- api.joinedTeamIdsOfUserAsSeenBy(user)
teams <- api.teamsByIds(ids)
teams <- env.team.memberRepo.addPublicLeaderIds(teams)
_ <- env.user.lightUserApi.preloadMany(teams.flatMap(_.publicLeaders))
yield teams

def requests(teamId: TeamId) = Scoped(_.Team.Read) { ctx ?=> me ?=>
WithOwnedTeamEnabled(teamId, _.Request): team =>
Expand Down

0 comments on commit 99b713e

Please sign in to comment.