Ensure credential objects come oldest first (#1258)
Given the credentials are loaded based on userId, sort is not consistent.
Without this, events are booked on whichever calendar credential is loaded first. 
813eaa83b7/lib/events/EventManager.ts (L240-L244)
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
			
			
This commit is contained in:
		
							parent
							
								
									dc13c95644
								
							
						
					
					
						commit
						c109ab1e30
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -63,7 +63,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) | ||||||
|     }, |     }, | ||||||
|     select: { |     select: { | ||||||
|       id: true, |       id: true, | ||||||
|       credentials: true, |       credentials: { | ||||||
|  |         orderBy: { id: "desc" as Prisma.SortOrder }, | ||||||
|  |       }, | ||||||
|       timeZone: true, |       timeZone: true, | ||||||
|       email: true, |       email: true, | ||||||
|       name: true, |       name: true, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Rory Hughes
						Rory Hughes