Check if user exists or return a 404 before proceeding
This commit is contained in:
		
							parent
							
								
									17b880335a
								
							
						
					
					
						commit
						9ce82360c0
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		|  | @ -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 a new issue
	
	 Alex van Andel
						Alex van Andel