Check if user exists or return a 404 before proceeding
parent
17b880335a
commit
9ce82360c0
|
@ -266,6 +266,12 @@ export async function getServerSideProps(context) {
|
|||
}
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
return {
|
||||
notFound: true,
|
||||
}
|
||||
}
|
||||
|
||||
const eventType = await prisma.eventType.findFirst({
|
||||
where: {
|
||||
userId: user.id,
|
||||
|
|
Loading…
Reference in New Issue