feat: Add availableTeams to auth.info endpoint (#3981)

* Index emails migration

* feat: Add available teams to auth.info endpoint

* test

* separate presenter

* Include data from sessions cookie, include likely logged in state

* test

* test: Add test for team only in session cookie

* Suggested query change in PR feedback
This commit is contained in:
Tom Moor
2022-09-10 15:58:38 +02:00
committed by GitHub
parent c10be0ebaa
commit 1f93399447
11 changed files with 150 additions and 24 deletions

View File

@@ -16,6 +16,6 @@ export default function present(team: Team) {
url: team.url,
defaultUserRole: team.defaultUserRole,
inviteRequired: team.inviteRequired,
allowedDomains: team.allowedDomains.map((d) => d.name),
allowedDomains: team.allowedDomains?.map((d) => d.name),
};
}