Skip to content

Commit

Permalink
fix: add orderBy clause for exerciseIndex in new workouts
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyAsh5114 committed Nov 1, 2024
1 parent 2de139b commit e6818a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/trpc/routes/workouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const createActiveMesocycleWithProgressionDataInclude = (splitDayIndex?: number)

return Prisma.validator<Prisma.MesocycleInclude>()({
mesocycleExerciseSplitDays: {
include: { mesocycleSplitDayExercises: true },
include: { mesocycleSplitDayExercises: { orderBy: { exerciseIndex: 'asc' } } },
orderBy: { dayIndex: 'asc' }
},
mesocycleCyclicSetChanges: true,
Expand Down

0 comments on commit e6818a5

Please sign in to comment.