Fixes #701: User's page shows Team events with broken links (#761)

This commit is contained in:
Alex van Andel 2021-09-24 11:23:08 +01:00 committed by GitHub
parent 420daec147
commit 2b2fde179a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,11 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
const eventTypesWithHidden = await prisma.eventType.findMany({
where: {
AND: [
{
teamId: null,
},
{
OR: [
{
userId: user.id,
@ -105,6 +110,8 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
},
],
},
],
},
select: {
id: true,
slug: true,